json4s: one json ast to rule them all.

Visto 614 veces
Saltar al primer mensaje no leído

Ivan Porto Carrero

no leída,
29 ago 2012, 11:21:3029/8/12
a scala...@googlegroups.com
Hi, 

At this moment there are at least 6 json libraries for scala, not counting the java json libraries. All these libraries have a very similar AST. This project aims to provide a single AST to be used by other scala json libraries.

https://github.com/json4s/json4s

I've extracted lift-json from lift and renamed its package to be native. It's still licensed under the same license etc.
So the current AST is based on the the JValue from lift-json with the addition that it now also supports using bigdecimal in addition of a double to represent decimal values.

You can still use the Formats provided by lift-json but it also supports the approach Play2 has taken with type classes. On a JValue there are 3 new methods which take a Reader (Reads) as implicit to extract values.

I've also included a parser that uses jackson instead of the native scala parser provided by lift-json.

I hope this is a project you guys think is worth pursuing and want to contribute to. It helps a lot when you want to/have to support different json libraries.

Eduardo Pareja Tobes

no leída,
29 ago 2012, 11:45:3629/8/12
a Ivan Porto Carrero,scala...@googlegroups.com

nice!

are you aware of Rosetta Json?

--
Eduardo Pareja Tobes

Alex Cruise

no leída,
29 ago 2012, 14:24:4829/8/12
a Ivan Porto Carrero,scala...@googlegroups.com
On Wed, Aug 29, 2012 at 8:21 AM, Ivan Porto Carrero <iv...@flanders.co.nz> wrote:
At this moment there are at least 6 json libraries for scala, not counting the java json libraries. All these libraries have a very similar AST. This project aims to provide a single AST to be used by other scala json libraries.


Awesome! I hope, if it's any good, that everyone will agree on it and adopt it quickly. ;)

-0xe1a

Matthew Pocock

no leída,
30 ago 2012, 7:14:1730/8/12
a Alex Cruise,Ivan Porto Carrero,scala...@googlegroups.com
http://xkcd.com/927/

Standards
--
Dr Matthew Pocock
Integrative Bioinformatics Group, School of Computing Science, Newcastle University
skype: matthew.pocock
tel: (0191) 2566550

doug

no leída,
30 ago 2012, 13:35:3930/8/12
a scala...@googlegroups.com,Ivan Porto Carrero

Ivan Porto Carrero

no leída,
30 ago 2012, 18:36:0330/8/12
a scala...@googlegroups.com,Ivan Porto Carrero
I removed the jackson-scala-module dependency and published the project for a bunch of scala versions.



before I accidentally published with crosspaths disabled, that has also been addressed obviously.

Ivan Porto Carrero

no leída,
4 sept 2012, 7:29:054/9/12
a scala...@googlegroups.com,Ivan Porto Carrero
There is now also a scala 2.10 build available for json4s

I don't think it will be possible to support both scala 2.8 and 2.10 from the same codebase, mostly because of the different scalaz versions required

Kaspar Fischer

no leída,
6 nov 2012, 4:51:136/11/12
a scala...@googlegroups.com,Ivan Porto Carrero
Hi Ivan, 

I was wondering whether the 2.10-RC1 release (or snapshot) of json4s is available publicly somewhere?

Thanks,
Kaspar

Kaspar Fischer

no leída,
6 nov 2012, 4:59:016/11/12
a scala...@googlegroups.com,Ivan Porto Carrero

Jacobus

no leída,
6 nov 2012, 8:40:206/11/12
a scala...@googlegroups.com
Hi,

I use spray-json (https://github.com/spray/spray-json) but json4s looks like a great project also. I realise I'm not comparing apples with apples, as they are serving different purposes.

json4s may also be well suited to serve as a Slick (http://slick.typesafe.com/) driver - Allowing you to 'query' JSON over webservices in a similar fashion to the way you would query a database.

Best regards,
Jacobus
Responder a todos
Responder al autor
Reenviar
0 mensajes nuevos