Giter Site home page Giter Site logo

Comments (5)

rpgmaker avatar rpgmaker commented on July 27, 2024

It does not because I was checking for default value of type and
eliminating the field based on it. I can add a flag for eliminating
defaults and also fix the issue with leaving a comma in there for creating
default and also use a different formatter for float.

from netjson.

amacal avatar amacal commented on July 27, 2024

Eliminating default values could be 'questionable'. When you serializing the object currently you assume the client deserializing the object will use exactly the same class definition. In my case I could deserialize this missing (server-side int) id = 0 in client side as int? to null. You know, it can lead to problems. This optimization should be used when the implications are understood.

from netjson.

rpgmaker avatar rpgmaker commented on July 27, 2024

That is why I will have a flag for determining when to eliminate primitive
type. It helps the payload size generally. So by default it will eliminate
them except you turn off the flag

from netjson.

rpgmaker avatar rpgmaker commented on July 27, 2024

Test it again. I added a new flag to turn it off and on. The default is true, so you will have to set it to false or just compile the dll with false hard-coded. The issue with leading comma has been fixed too which causes invalid json.

from netjson.

amacal avatar amacal commented on July 27, 2024

It works, thanks.

from netjson.

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.