Code Monkey home page Code Monkey logo

lwjson's People

Contributors

ericsidorov avatar jsalda avatar majerle avatar tbitcs avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

lwjson's Issues

Add support for token counter feature

This is to be used by user prior input token set allocation.

Using this feature, user can check if input is valid and can understand how many tokens are necessary for successful JSON parsing.

Incorrectly accepts form-feed

prv_skip_blank has the following comment:

Skip all characters that are considered *blank* as per RFC4627

However, \f has never been considered a whitespace character in RFC4627.

Also applies to streaming mode.

Support to generate JSON output

To be able to generate JSON string output from input tokens.

  • Must be able to generate all token types as output string
  • Float generation support must be minimal. Very basic with fixed precision
  • Minimalistic output with optional beautify support (TBC)

lwjson_get_tokens_used(lw)

should this macro be adding one in the return value?

#define lwjson_get_tokens_used(lw) (((lw) != NULL) ? ((lw)->next_free_token_pos + 1) : 0)

For the following JSON string it returns 5.
{ "HasExpiry":true, "Expires":1661535805452, "ServerTime":1661535505452, "Nonce":"968642096" }

long long integers are not properly supported.

long long integers are not correctly supported due to how prv_parse_number is using lwjson_real_t for parsing integers. Even if lwjson_real_t is defined as a double, this only allows storing up to 53 bit integers (assuming you are using a system which supports IEEE 754 double precision floating point numbers). I propose adding a second variable handle the value as an integer. I will follow up with a pull request.

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.