GithubHelp home page GithubHelp logo

Comments (4)

joergbattermann avatar joergbattermann commented on August 17, 2024

There are (passing) Tests that serialize and deserialize GeographicPosition instances (see i.e.

var actualPolygon = JsonConvert.DeserializeObject<Polygon>(json);
) so I suspect it might have something to do with how you configure / use Json.Net. A quick search using your favourite search engine for "Json.net and Private Property Setters" does provide all information needed to understand how Json.Net handles these and how to include them in (de)serialization, i.e. http://danielwertheim.se/json-net-private-setters/.

from geojson.net.

matt-lethargic avatar matt-lethargic commented on August 17, 2024

@nadavpld Can this be closed now?

from geojson.net.

nadavpld avatar nadavpld commented on August 17, 2024

I couldn't make it work at the end and had to leave the setters non-private because it was too much overhead for such a simple task, Unfortunately I didnt have time to get back to it.
Its been few months since I had a look at this piece of code, I will give it another try and let you know (in private?).

from geojson.net.

matt-lethargic avatar matt-lethargic commented on August 17, 2024

Ok, I'll close this for now, if you do go back to it feel free to re-open this issue, or indeed open another one and post the json you are trying to deserialize and a code snippet and I can have a proper look. All of our deserialization tests work fine with private setters so it would be interesting to see whats going on if it's still the case.

from geojson.net.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.