Git Product home page Git Product logo

Comments (8)

GoogleCodeExporter avatar GoogleCodeExporter commented on May 8, 2024 1
Just a suggestion: make it "pull" variety (~= stax), since it is trivial to 
invert
Stax to produce SAX-like events (so "SAX" part can build on lower-level "Stax" 
part).
The reverse is not generally possible without multi-threading (or language 
support
for co-procedures/closures).

Original comment by [email protected] on 11 Aug 2008 at 10:30

from gson.

GoogleCodeExporter avatar GoogleCodeExporter commented on May 8, 2024
Would this be served by providing a hook to plug-in a different JSON parser? 

Can you give us some concrete examples of where this will be useful? You can use
custom serializer/deserializers to do the customized handling anyway. But you 
are
right, our parser creates the parse tree first, so can choke on very large 
input. 

Original comment by inder123 on 4 Aug 2008 at 6:44

from gson.

GoogleCodeExporter avatar GoogleCodeExporter commented on May 8, 2024
http://www.cowtowncoder.com/hatchery/jackson/index.html

I am using JSON-lib and looking for a better one. I myself like upper lib so far
since it supply a Streaming API which allows to process huge data. But then I 
found
your lib, which is also a nice one expect do not support Streaming API. I think 
which
would be a highlight if you can add it in.

When I said customize the parsing, I mean you could supply event like SAX do, 
so I
can create new instance or set value according to the events. 

I do not how to do these because I do not know parsing algorithm. But I wish to
supply some idea to make gson better.

Thanks,

Jiming




Original comment by [email protected] on 5 Aug 2008 at 3:09

from gson.

GoogleCodeExporter avatar GoogleCodeExporter commented on May 8, 2024
We thought more about it, and it seems that this is worth doing since it will 
enable
Gson to process really large documents. We will essentially have to rewrite our
parser to either support SAX (event based) or StAX (Streaming based) parsing. 
This
can probably be done by modifying our JavaCC grammar itself. This is a major
undertaking, but we will consider this for one of our major releases. 

Original comment by inder123 on 5 Aug 2008 at 6:12

  • Changed state: Accepted
  • Added labels: Type-Enhancement
  • Removed labels: Type-Defect

from gson.

GoogleCodeExporter avatar GoogleCodeExporter commented on May 8, 2024
Great to hear that!

Thanks and looking forward to that.

Jiming

Original comment by [email protected] on 6 Aug 2008 at 2:19

from gson.

GoogleCodeExporter avatar GoogleCodeExporter commented on May 8, 2024
Hi I just ran into this issue as well.  Any timeline for when issue 28 will be 
addressed?

Original comment by [email protected] on 21 Nov 2008 at 4:56

from gson.

GoogleCodeExporter avatar GoogleCodeExporter commented on May 8, 2024
Well, I looked into rewriting our JavaCC parser to be a SAX or pull-based one, 
and 
was not terribly successful. At this time, we have put this on hold. If someone 
can 
point us to a third-party SAX/pull parser that we can adapt, we will consider 
using 
it. Or better, help us write one. 

This will likely have an impact on the backward compatibility. However, that is 
something we can carefully weigh on.

Original comment by inder123 on 22 Nov 2008 at 2:15

from gson.

GoogleCodeExporter avatar GoogleCodeExporter commented on May 8, 2024
We dont have SAX like functions, but Gson 1.4 adds a JsonParserAsync class that 
lets 
you parse multiple JSON objects on a stream. 

Overall, backwards compatibility is quite important for us, so I dont see us 
breaking 
that in favor of a SAX like parser (which is in general harder to use).

Original comment by inder123 on 1 Oct 2009 at 4:01

  • Changed state: WontFix

from gson.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.