-
Notifications
You must be signed in to change notification settings - Fork 4.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Request For Comments: How about annotation processing? #807
Comments
Sounds similar to Logan Square. My preference is as a standalone project. |
I will developing this project as a standalone. Thanks. BTW, Logan Square is great. It seems fastest in serialization. Interestingly, however, static gson is faster than Logan Square in deserialization. Added LoganSquare benchmark to the StaticGson with the same JSON data:
|
@gfx Yes, makes sense to develop as a standalone project, and as it matures, we can consider borrowing some features in Gson core. Great idea, BTW. I wasn't familiar with Logan Square either. Looking forward to more documentation/tutorial on your project page and trying it out. |
@gfx Wow, this is pretty crazy timing. I was looking for a project that did this over a week ago. Since you hadn't posted this at the time, I have also started working on a very similar project: My project generates type adapters as well. I have also added a very basic json path generator as part of the project. e.g. "Parent.Child" would create nested loops within the type adapter which can help flatten the POJO Did you have any plans to implement something similar? Or is the main focus to keep it fairly simplistic? |
@LachlanM OMG. If I knew your project, I wouldn't make Static Gson. lol. JSON path style seems interesting although I didn't have a plan yet. My first aim is to use Static Gson in my projects with least effort. JSON path will be the second milestone. |
StaticGson starts is released as an independent artifact: https://bintray.com/gfx/maven/static-gson/ Thanks. |
I'm writing a Gson extension, which uses annotation processing to generate type adapter factories:
This is faster than the reflection based adapters which gson has. In fact, even faster than Moshi.
And here is a question: should I develop this extension as a standalone library? Or should I make a pull-request to Gson as a
processor
module?P.S. here is a benchmark result. "dynamic gson" is the original reflection based with Gson 2.6.2, "static gson" is StaticGson, and moshi is Moshi v1.1.0:
The text was updated successfully, but these errors were encountered: