google / gson

A Java serialization/deserialization library to convert Java Objects into JSON and back
Apache License 2.0
23.41k stars 4.29k forks source link

gson-joda-time and gson-jsr310 #878

Closed cbornet closed 8 years ago

cbornet commented 8 years ago

Jackson has jackson-datatype-jsr310 and jackson-datatype-joda artifacts to provide support of truely usable date types. I am willing to do the same kind of modules for gson with type adapters. I think this has more value to make it as maven sub-modules to this project (like gson-extras) but I can also do it as a personal project. What do you prefer ?

inder123 commented 8 years ago

It's your choice. You can also issue a pull request to https://github.com/google-gson/typeadapters (note that some JodaTime type adapters are already present there).

cbornet commented 8 years ago

@inder123 is that an official gson repo ? It doesn't seem very lively nor popular...

cbornet commented 8 years ago

@inder123 It seems maintained by you. Don't you think it would have more visibility if it were hosted in the main repo ? Or if there was some documentation pointing to it ? Anyway, I will PR on it. Thx for notifying.

inder123 commented 8 years ago

Agreed, it makes sense to move it to Gson extras.

Feel free to issue a PR to move it there.

cbornet commented 8 years ago

OK. I'll move it here. Since joda pulls an external library and jsr310 requires java8, they should have their own pom.xml. So I propose to make 3 modules in extras directory: gson-extras, gson-extras-joda-time, gson-extras-jsr-310. OK with that ?