Instagram / ig-json-parser

Fast JSON parser for java projects
https://instagram-engineering.com/fast-auto-generated-streaming-json-parsing-for-android-ab8e7be21033
MIT License
1.32k stars 124 forks source link

Add support for optional serializer generation. #28

Closed tkieft closed 9 years ago

tkieft commented 9 years ago

This will allow the user to enable or disable the generation of serializer code on a per-class or global basis, saving on code size and method count.

ttung commented 9 years ago

You could save just as many methods if you made the String <-> Object serializer/deserializer optional. :)

tkieft commented 9 years ago

String <-> Object do you think that's actually a good idea? The reason I did this is that we rarely use serializers, and this also saves us from writing serializeCodeFormatters.

tkieft commented 9 years ago

I guess we mostly use the parseFromJson(jp) version, but for serializers I imagine the String version is more widely used.

ttung commented 9 years ago

We mostly just use parseFromJson(jp), and we mostly just use serializeToJson(JsonGenerator,...

Only the top-level objects would ever use the string versions.

tkieft commented 9 years ago

@ttung good point. I suppose that could be a separate feature request :)

tkieft commented 9 years ago

ping?

ttung commented 9 years ago

Sorry. Github is not the greatest at notifying when a PR has been updated. As in it doesn't.