Giter VIP home page Giter VIP logo

jsmn-find's Introduction

jsmn-find's People

Contributors

jdeokkim avatar lcsmuller avatar ratakor avatar tarbomb avatar thepedroo avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

thepedroo

jsmn-find's Issues

Bug in memory allocation fix

Hi,

during my tests I found a bug in the fix for #20. I had issues with corruption of already declared tokens.

Memset in following code will start at wrong address
memset((tmp) + *(prev_size), 0, (new_size - *(prev_size)) * sizeof *(ptr));

I think correct code should looks like:
memset((tmp) + *(prev_size) * sizeof *(ptr), 0, (new_size - *(prev_size)) * sizeof *(ptr));

Test string: "{"status":"enabled","timestamp":"2023-08-24T07:59:03Z"}\n"
Fails with: JSMN_ERROR_INVAL, unmatched closing bracket

BR,
Diego

Rewrite this lib as being a `jsmn` fork instead of an add-on

Describe the feature

There's not much to gain in making this library depend on jsmn.h to be used. It should be updated as a jsmn fork instead.

Acceptance criteria

  • Match jsmn codebase with this lib's syntax rules
  • Get rid of unneeded jsmn features
  • Rename this lib to json-lookup
  • (bonus) Can we get rid of chash dependency aswell? Is it viable?

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.