Git Product home page Git Product logo

cycle's Introduction

NPM Downloads jsDelivr Hits NPM Version

Fork of https://github.com/douglascrockford/JSON-js, maintained in npm as cycle.

Contributors

  • Douglas Crockford
  • Nuno Job
  • Justin Warkentin

JSON in JavaScript

Douglas Crockford [email protected]

2010-11-18

JSON is a light-weight, language independent, data interchange format. See http://www.JSON.org/

The files in this collection implement JSON encoders/decoders in JavaScript.

JSON became a built-in feature of JavaScript when the ECMAScript Programming Language Standard - Fifth Edition was adopted by the ECMA General Assembly in December 2009. Most of the files in this collection are for applications that are expected to run in obsolete web browsers. For most purposes, json2.js is the best choice.

json2.js: This file creates a JSON property in the global object, if there isn't already one, setting its value to an object containing a stringify method and a parse method. The parse method uses the eval method to do the parsing, guarding it with several regular expressions to defend against accidental code execution hazards. On current browsers, this file does nothing, prefering the built-in JSON object.

json.js: This file does everything that json2.js does. It also adds a toJSONString method and a parseJSON method to Object.prototype. Use of this file is not recommended.

json_parse.js: This file contains an alternative JSON parse function that uses recursive descent instead of eval.

json_parse_state.js: This files contains an alternative JSON parse function that uses a state machine instead of eval.

cycle.js: This file contains two functions, JSON.decycle and JSON.retrocycle, which make it possible to encode cyclical structures and dags in JSON, and to then recover them. JSONPath is used to represent the links. http://GOESSNER.net/articles/JsonPath/

cycle's People

Contributors

dscape avatar jwarkentin avatar lukasdrgon avatar prescod avatar

Stargazers

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

Watchers

 avatar  avatar  avatar

cycle's Issues

Please add a License

Thank you for publishing this library! It is a dependency for many node projects and license scanners flag this library and it's consumers for not having a license. Could you add a permissive license such as MIT?

release new npm version

Package.json has a license field on master but currently the npm [email protected] has no license. Tools like legally and tldrlegal aren't parsing the public domain license from the source.

I see you've updated the license in the package.json so it would be nice to get that out into npm.

Thanks!

Hi,Nuno Job

Hi,Nuno Job,the original author license Where can I check it, thanks

No license

This might be intentional, but this package has no license file, which makes it copyrighted by default. This makes it impossible for me to use it in my project through NPM. I, and many with me I assume, would appreciate it if a license file could be chosen, even if this makes it explicitly copyrighted, because in this case I know what steps to undertake. I understand this is a fork from https://github.com/douglascrockford/JSON-js and I left a similiar comment at that repo.

Thank you in advance for your response.

License

Hi there,

We are using this library in our open source product and it appears this library does not have a license. Would you mind adding one? It would be greatly appreciated, thank you!

License?

Does this project have a license associated with it? I don't see one in this Github repo or in the JSON-js repo.

cycle 1.0.3

Hi,Nuno Job,There is no license file in cycle 1.0.3. Can supplement the license file, thank you!

License missing

Hello,

It would be great if you could identify the License which is used by cycle.js. License is an important aspect that could be vital for all projects that are using cycle right now.

I could suggest two very nice licences, one is WTFPB

http://wtfpl2.com/

Very simple and understandable. Another very popular license in node.js community is MIT:

http://opensource.org/licenses/MIT

Don't forget to put LICENSE file in the root and add 'license' in your package.json. I can also do a pull request for license of your choice ;)

Thanks!

Renat

Comments contain code that confusingly won't work

JSON.stringify(JSON.decycle(a));
Getting this code to work is the reason I downloaded the library
And I got the above from the comments in the code.
But this code does not wire up the prototype for JSON.decycle() to work, so it's a tad confusing

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.