Giter Site home page Giter Site logo

/v1/db_size/get formatting about leap HOT 2 OPEN

Rossco99 avatar Rossco99 commented on July 16, 2024
/v1/db_size/get formatting

from leap.

Comments (2)

Rossco99 avatar Rossco99 commented on July 16, 2024

I did some more checking this morning, it would seem to be that this issue is from v5.0.2 and is also seen in v1.0.0-beta1.2

from leap.

spoonincode avatar spoonincode commented on July 16, 2024

This is long standing behavior with nodeos' JSON formatting that has existed since 1.0: numbers 2^32 or greater are quoted, while numbers less than that are not. It'll be formatted this way on just about any JSON response, not just db_size

Obviously this does make it more difficult to handle the JSON returned from nodeos since you don't know in advance what type a value will be for a response that is a number.

With modern tech it might make sense to never quote numbers and force any receiver to parse them as bigints if they want proper behavior. But such a change would need to be done carefully for compatibility reasons.

from leap.

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.