icubilla / jsonexserializer

Automatically exported from code.google.com/p/jsonexserializer
0 stars 0 forks source link

the comment before the json text gets JQuery unable to work #47

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. make a page that return a json data
2. use jquery to call that page (dataType="json")
3. success is never called, furthermore seems to interpret it few times as 
denied

What is the expected output? What do you see instead?
to get the json object, here success is never called

What version of the product are you using? On what operating system?
JsonExSerializer-3.01.148.219
on windows 2003 server

How to rid off of those comments at the beginning of the serialisation?

Original issue reported on code.google.com by sylvain....@gmail.com on 23 Jul 2009 at 8:03

GoogleCodeExporter commented 9 years ago
ok I found that I should use the SerializationContext
but I think the option to not display the comment should be enabled by default

Original comment by sylvain....@gmail.com on 23 Jul 2009 at 8:30

GoogleCodeExporter commented 9 years ago
That's potentially a good idea, I'll consider that.

Original comment by elliott....@gmail.com on 23 Jul 2009 at 1:01

GoogleCodeExporter commented 9 years ago
and actually also to disable by default the output of the type

        SerializationContext context = new SerializationContext();
        context.OutputTypeComment = false;
        context.OutputTypeInformation = false;

Original comment by sylvain....@gmail.com on 23 Jul 2009 at 1:14

GoogleCodeExporter commented 9 years ago
Actually what you want is the SetJsonStrictOptions:

context.SetJsonStrictOptions();

Original comment by elliott....@gmail.com on 24 Jul 2009 at 2:18

GoogleCodeExporter commented 9 years ago
Could it be the default option?

Original comment by sylvain....@gmail.com on 24 Jul 2009 at 8:51

GoogleCodeExporter commented 9 years ago

Original comment by elliott....@gmail.com on 11 Jan 2010 at 3:27