Question regarding marshalling and unmarshalling

1 view
Skip to first unread message

hdevml

unread,
Sep 10, 2010, 9:25:26 PM9/10/10
to jsonmarshaller
Hi all,

1. While marshalling it spits out a JSONObject object? Which library's
JSONObject is this? I looked at the source and could not find a
JSONObject class.

2. Does unmarshalling support unmarshalling from a String? or do I
have to unmarshal it to a JSONObject first and then to the real
object?

3. In marshalling, is there any option to marshall it directly to
Strings?

Please let me know.

Thanks

Hylke van der Schaaf

unread,
Sep 11, 2010, 5:32:24 AM9/11/10
to jsonmar...@googlegroups.com
Hi hdevml,

hdevml wrote:
> 1. While marshalling it spits out a JSONObject object? Which library's
> JSONObject is this? I looked at the source and could not find a
> JSONObject class.

It looks like the introduction wiki page is
outdated,Marshaller.marshall(T t) returns a Json.Value.

> 2. Does unmarshalling support unmarshalling from a String? or do I
> have to unmarshal it to a JSONObject first and then to the real
> object?
> 3. In marshalling, is there any option to marshall it directly to
> Strings?

You have to do both actions in two steps. Of course you can nest the two
calls to make it one line.

Kind regards,
Hylke

hdev ml

unread,
Sep 13, 2010, 7:54:56 AM9/13/10
to jsonmar...@googlegroups.com
Are there performance implications of point 2 and 3. Since it becomes a 2 step process? i.e. converting from String to Json.Value and then converting to the actual object?

If there are, Is there a possibility that a direct method will be created for conversion to/from a String for performance reason?



--
You received this message because you are subscribed to the Google Groups "jsonmarshaller" group.
To post to this group, send email to jsonmar...@googlegroups.com.
To unsubscribe from this group, send email to jsonmarshalle...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/jsonmarshaller?hl=en.


Pascal Perez

unread,
Sep 13, 2010, 2:37:19 PM9/13/10
to jsonmar...@googlegroups.com, jsonmar...@googlegroups.com
Performance should be a non issue. The JsonMarshaller is very fast, and has been optimized a lot.

PL
Reply all
Reply to author
Forward
0 new messages