Re: Simple Deserialization utility in Ruby.
Walter Lee Davis <[email protected]>
| Newsgroups | gmane.comp.lang.ruby.general |
|---|---|
| Message-ID | <[email protected]> |
Have you tried JSON.parse for this? Walter > On Dec 22, 2018, at 4:18 PM, Vineel Yalamarthi <[email protected]> wrote: > > Hi Guys > > I'm new to Ruby and wondering if there is a deserialization utility in Ruby similar to Java's Google GSON library. > > When we use Google GSON, there is no need to define custom deserializer or define in the model class that we want this to be serializable etc. > > I posted more details here: > https://stackoverflow.com/questions/53899249/json-deserialization-in-ruby > > For instance, in Java using Google GSON, we can accomplish conversion of String (Json object) to custom Java object . > > Address address=gson.fromJson(addressJsonStringForm, Address.class); > > Thanks in advance. > > Regards > Vineel > > > > > Unsubscribe: <mailto:[email protected]?subject=unsubscribe> > <http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-talk> Unsubscribe: <mailto:[email protected]?subject=unsubscribe> <http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-talk>