http://databinder.net/dispatch-doc/dispatch/json/JsObject.html
As to why scala.util.parsing.json was implemented that way my guess
would be that at the
time it was written it was intended primarily to show of Scala's
combinator parsing and not
necessarily to provide a usable json library.
-Rob
My impression is that most people using Scala don't actually using
scala.util.parsing.json
Hi guys,
I just want to chime in as the guy that maintains said parser. I
wrote it a loooong time ago as part of learning the parsing library and
it ended up getting included in the core libs. At the time I knew only a
small fraction of what I do know about writing useful Scala libraries.
If truly no one is using it I would absolutely love to perform a
scorched-earth overhaul and make it a lot more sane (and typed). I'm
really not sure at this point how to gauge that, though. I suppose I
could simply write a new parser under the same package, but that doesn't
leave me with a warm, fuzzy feeling, either.
The other thing is that Joni has done an absolutely amazing job with
lift-json, and I don't think I can replicate that. If that's really what
people want in the core lib then the discussion needs to be with Martin
about how that could be achieved.
Cheers,
Derek
If truly no one is using it I would absolutely love to perform a
scorched-earth overhaul and make it a lot more sane (and typed).
Derek> The other thing is that Joni has done an absolutely amazing job
Derek> with lift-json, and I don't think I can replicate that. If
Derek> that's really what people want in the core lib then the
Derek> discussion needs to be with Martin about how that could be
Derek> achieved.
+1
I see this come up over and over and over again on IRC. Beginners pop
up, want to do JSON stuff, naturally they try the standard library stuff
first, and then suddenly they find themselves in a world of untyped hurt
and have all sorts of weird questions and misunderstandings about Any,
type erasure, and so on. Eventually someone tells them to use lift-json
instead and sends them on their way.
Even if lift-json isn't added right away, it seems to me that the old
stuff could simply be deprecated in 2.9?
--
Seth Tisue | Northwestern University | http://tisue.net
lead developer, NetLogo: http://ccl.northwestern.edu/netlogo/
>>>>> "Derek" == Derek Chen-Becker <ja...@chen-becker.org> writes:
Derek> The other thing is that Joni has done an absolutely amazing job
Derek> with lift-json, and I don't think I can replicate that. If
Derek> that's really what people want in the core lib then the
Derek> discussion needs to be with Martin about how that could be
Derek> achieved.
+1
I see this come up over and over and over again on IRC. Beginners pop
up, want to do JSON stuff, naturally they try the standard library stuff
first, and then suddenly they find themselves in a world of untyped hurt
and have all sorts of weird questions and misunderstandings about Any,
type erasure, and so on. Eventually someone tells them to use lift-json
instead and sends them on their way.
Even if lift-json isn't added right away, it seems to me that the old
stuff could simply be deprecated in 2.9?
Hi Sadek
You can have both the generic version and the other. Note that in scala the advantage is not as high due to the type inference -- the type will have to be specified by the calling client.
I've considered writing a JSON parser because I am not happy with any of the existing ones.
You might be interested in this
http://hackage.haskell.org/package/JSON-Combinator
Unfortunately this kind of library is not possible in scala without functional dependencies/type families, but I can specialise (repeat) it to each parser.
You can have both the generic version and the other. Note that in scala the advantage is not as high due to the type inference -- the type will have to be specified by the calling client.
I've considered writing a JSON parser because I am not happy with any of the existing ones.
You might be interested in this
http://hackage.haskell.org/package/JSON-CombinatorUnfortunately this kind of library is not possible in scala without functional dependencies/type families, but I can specialise (repeat) it to each parser.
As for the practical application for this thread, yes, you can just
specialise to one representation and there is no need for fundeps --
scala is capable of everything else besides this.
> wrote it a loooong time ago as part of learning the parsing library and
> it ended up getting included in the core libs.
Perhaps it would be a good thing then to make it part of documentation ?
1st part - how the certain Scala feature allowed to make a library
and 2nd part - why this approach for given task is not practical
--
Написано в почтовом клиенте браузера Opera: http://www.opera.com/mail/