Type information is json output

27 views
Skip to first unread message

Luke Pulverenti

unread,
Aug 16, 2012, 2:02:52 PM8/16/12
to servic...@googlegroups.com
Is this used during deserialization? 

Demis Bellot

unread,
Aug 16, 2012, 2:05:24 PM8/16/12
to servic...@googlegroups.com
It's only emitted when it's required:


On Thu, Aug 16, 2012 at 2:02 PM, Luke Pulverenti <luke.pu...@gmail.com> wrote:
Is this used during deserialization? 



Luke Pulverenti

unread,
Aug 16, 2012, 2:07:26 PM8/16/12
to servic...@googlegroups.com
Yea I get that, but I'm wondering what it's used for.

I read that exact question on StackOverflow and so I'm wondering if it can be used to solve the original poster's question.

Demis Bellot

unread,
Aug 16, 2012, 2:11:27 PM8/16/12
to servic...@googlegroups.com
It's used to support inheritance, interfaces and late-bound object types. 
Without the type info the serializers will have no clue (i.e. can't work) what the deserialized type needs it needs to be serialized into.

As I mentioned in the answer, if it's being emitted in your JSON, you're likely doing something wrong.

Luke Pulverenti

unread,
Aug 16, 2012, 2:15:43 PM8/16/12
to servic...@googlegroups.com
Well I do have inheritance in my DTO's.



On Thursday, August 16, 2012 2:02:52 PM UTC-4, Luke Pulverenti wrote:

Demis Bellot

unread,
Aug 16, 2012, 2:20:37 PM8/16/12
to servic...@googlegroups.com
and there-in lies your problem... :)

Dan B

unread,
Aug 17, 2012, 4:09:16 AM8/17/12
to servic...@googlegroups.com
Reply all
Reply to author
Forward
0 new messages