U4-9499 - Update to latest Json.Net

Created by Shannon Deminick 08 Feb 2017, 06:33:09 Updated by EMO 07 Apr 2017, 14:28:45

Tags: Unscheduled

Relates to: U4-1324

Subtask of: U4-7594

Comments

Shannon Deminick 08 Feb 2017, 06:38:07

There are very few and very minor 'breaking' changes between the version we are using and the latest, but there are vast improvements both in features, fixes and performance.

See: https://github.com/JamesNK/Newtonsoft.Json/releases

From version 6.0.8 -> 9.0.1 , Breaking changes would be indicated with "Change"


Shannon Deminick 08 Feb 2017, 06:38:52

Marking as not backward compatible just in case someone is relying on one of the Changed item functionality


Shannon Deminick 08 Feb 2017, 06:48:21

PR: https://github.com/umbraco/Umbraco-CMS/pull/1741


Claus Jensen 08 Feb 2017, 07:59:39

Been using this for some time in 7.x projects without seeing any issues. Have tested that the backoffice works in v. 7.6 -- merging in.


Sebastiaan Janssen 08 Feb 2017, 09:22:31

This needs a config transform for NuGet upgrades (bindingRedirect) - it's: ~\build\NuSpecs\tools\Web.config.install.xdt


Shannon Deminick 09 Feb 2017, 00:59:40

Updated, and my binding ranges were wrong too :( should be good now.


EMO 07 Apr 2017, 14:01:04

I noticed that LeBlender isn't working in 7.6. It has a surface controller https://github.com/Lecoati/LeBlender/blob/master/Src/Lecoati.LeBlender.Extension/Controllers/PropertyGridEditorController.cs which looks like pretty normal stuff.

GetAll() is returning JSON that looks like this: )]}', [{"name":"Rich text editor","alias":"rte","isGridEditor":true,"editor":{"view":"rte"},"prevalues":null},{"name":"Image","alias":"image","isGridEditor":true,"editor":{"view":"media"},"prevalues":null},{"name":"Macro","alias":"macro","isGridEditor":true,"editor":{"view":"macro"},"prevalues":null},{"name":"Embed","alias":"embed","isGridEditor":true,"editor":{"view":"embed"},"prevalues":null},{"name":"Textstring","alias":"textstring","isGridEditor":true,"editor":{"view":"textstring"},"prevalues":{"fields":[{"label":"Style","key":"style","description":"inline style","view":"textstring","advanced":false},{"label":"Markup","key":"markup","description":"markup of the input","view":"textstring","advanced":false}]}},{"name":"LeBlender Editor","alias":"leblenderEditor","isGridEditor":true,"editor":{"view":"/App_Plugins/LeBlender/editors/leblendereditor/LeBlendereditor.html"},"prevalues":{"fields":[{"label":"Properties","key":"editors","description":"LeBlender Editor properties","view":"/App_Plugins/LeBlender/editors/leblendereditor/leblenderproperties.html","advanced":false},{"label":"Render in the grid","key":"renderInGrid","description":"Render in the grid","view":"boolean","advanced":true},{"label":"Min","key":"min","description":"Minimum number of items","view":"number","advanced":true},{"label":"Max","key":"max","description":"Maximum number of items","view":"number","advanced":true},{"label":"Cache period","key":"expiration","description":"Cache period in seconds (by page)","view":"number","advanced":true}]}}]

That )]}', looks a little strange to me, and to angular too which is pitching an error.

I raised an issue on LeBlender's github https://github.com/Lecoati/LeBlender/issues/65 but I think this issue might be part of the core product. I'm just taking a wild guess that it might be related to the upgrade to JSON.Net.


Sebastiaan Janssen 07 Apr 2017, 14:24:46

That )]}', is an angular security thing, nothing to worry about. See: JSON vulnerability protection - https://docs.angularjs.org/api/ng/service/$http#security-considerations


EMO 07 Apr 2017, 14:28:45

So cool, thanks Sebastiaan. I'll make sure to make use of that feature in future angular projects.


Priority: Normal

Type: Bug

State: Fixed

Assignee:

Difficulty: Normal

Category:

Backwards Compatible: False

Fix Submitted:

Affected versions:

Due in version: 7.6.0

Sprint: Sprint 52

Story Points:

Cycle: