speckleworks/SpeckleDynamo

SpeckleCore throws error in Sandbox

Closed this issue · 2 comments

Step 0:

Expected Behaviour

SpeckleCore should be able to use serialize and serialize JSON,

Actual Behaviour

Dynamo sandbox loads Newtonsoft.Json version 8.0.0.0 which does not have the NamingStrategy property for DefaultContractResolver, causing an error.

Problematic line:
ContractResolver = new Newtonsoft.Json.Serialization.DefaultContractResolver() { NamingStrategy = new Newtonsoft.Json.Serialization.CamelCaseNamingStrategy() }

image

Affected Projects

SpeckleDynamo

Proposed Solution (if any)

Thanks Mish, we’re aware of this and have a fix in mind! Will try implement next week.

For the time being Dynamo Revit should be loading the correct version.

This should be fixed in: dad4e28

We opted for manually adding and renaming Newtonsoft to the SpeckleCore repo and referencing it with an alias, then we can have both v8 and v12 :)

Will merge to master sometime this week!