We give the possibility to specify http get parameters also as json strings, to
allow class objects as parameter types for the web interfaces also.
The problem is, by using json-io, specifying @type in the json string is
mandatory for deserialization, right? Thus, the users have to specify it, which
is not so nice (for the return values its fine of course, but for parameters?)
I love the way json-io deals with types, for me, it is the best solution to
support polymorphism I have seen in such a library. Nevertheless, in this case,
the underlying type of the parameter normally not changes - it should be
transparent for the (e.g. javascript) user of the interface who creates the
json, and clear for the server.
Is it possible to add another method to JsonReader.jsonToJava(String json,
Class toplevelFallbackType) - where toplevelFallbackType could be also String,
Type, etc. of course.
This parameter would then be used as fallback if the @type was not specified in
the toplevel json object.
I know this would not work with polymorphism, but it would help us a lot and
would be maybe a nice enhanchement of json-ios functionality:)
Thanks and best regards
Christian
Original issue reported on code.google.com by christia...@gmail.com on 8 Jul 2014 at 3:44
Original issue reported on code.google.com by
christia...@gmail.com
on 8 Jul 2014 at 3:44