Skip to content

Switch default serializer to JSON.NET - #525

Merged
filipw merged 4 commits into
scriptcs:devfrom
khellang:json-net
Dec 6, 2013
Merged

Switch default serializer to JSON.NET#525
filipw merged 4 commits into
scriptcs:devfrom
khellang:json-net

Conversation

@khellang

@khellang khellang commented Dec 5, 2013

Copy link
Copy Markdown
Member

After the blow we got on NDC London, I think it's finally Time To Switch™. We can't really blame SS.Text when we picked it 😢
I created a new interface IObjectSerializer and pulled the implementation into Hosting. Less dependencies in Core! 😉 There's also some new tests that demonstrated where the SS.Text serializer was failing.

This fixes #288 and #377

@filipw

filipw commented Dec 5, 2013

Copy link
Copy Markdown
Member

nice +1 from me.
can you please add one more test - for circular reference?

@junosuarez

Copy link
Copy Markdown

For the edification of those of us who weren't at NDC London, could you share the insight that lead to this PR?

@filipw

filipw commented Dec 5, 2013

Copy link
Copy Markdown
Member

ah scratch that, it's already there! :)

@khellang

khellang commented Dec 5, 2013

Copy link
Copy Markdown
Member Author

could you share the insight that lead to this PR

@jden I wasn't there either, but apparently @jskeet made scriptcs crash, live on stage 😢 And it was due to a SS.Text bug we've know about for ages...

@khellang

khellang commented Dec 5, 2013

Copy link
Copy Markdown
Member Author

can you please add one more test - for circular reference?

@filipw I'll add one to make it explicit that it should handle it...

@glennblock

Copy link
Copy Markdown
Contributor

Yes, looks great!

filipw added a commit that referenced this pull request Dec 6, 2013
Switch default serializer to JSON.NET
@filipw
filipw merged commit dd3b3a0 into scriptcs:dev Dec 6, 2013
@filipw

filipw commented Dec 6, 2013

Copy link
Copy Markdown
Member

excellent PR :)

@adamralph

Copy link
Copy Markdown
Contributor

could you share the insight that lead to this PR

It was indeed at NDC London during the static vs dynamic cage match between Jon Skeet and Gary Bernhardt. It was me that spoke up and helped Jon work around the problem. He fired up the scriptcs REPL and did

typeof(DateTime).GetMethods();

and got

Process is terminated due to StackOverflowException.

I told him it's just the JSV serialization for the REPL output so he quickly changed it to:

typeof(DateTime).GetMethods().Select(m => m.Name);

ztone pushed a commit to ztone/scriptcs that referenced this pull request May 4, 2014
Switch default serializer to JSON.NET
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

exception dumping delegate value

5 participants