Giter VIP home page Giter VIP logo

anyjson's Introduction

AnyJSON

This project is no longer maintained.

Encode / Decode JSON By Any Means Possible

AnyJSON implements the NSJSONSerialization API for platforms that don't support it --- namely iOS < 5 and Mac OS X < 10.7 --- using the first available of the following 3rd-party libraries:

For anyone who appreciates lower-level Objective-C hacks, you won't want to miss how AnyJSON works its magic.

Compatibility

Supported Methods

The following methods are supported by AnyJSON:

+ (id)JSONObjectWithData:(NSData *)data
                 options:(NSJSONReadingOptions)opt
                   error:(NSError **)error

+ (NSData *)dataWithJSONObject:(id)obj
                       options:(NSJSONWritingOptions)opt
                         error:(NSError **)error

Supported Reading Options

  • NSJSONReadingMutableContainers is supported only by JSONKit
  • NSJSONReadingMutableLeaves is not supported (it doesn't even work with NSJSONSerialization on iOS 5+).
  • NSJSONReadingAllowFragments is not supported, though NextiveJSON always allows fragments

Supported Writing Options

  • NSJSONWritingPrettyPrinted is supported by JSONKit, yajl_json, and SBJSON

Unsupported Methods

The following methods are not currently supported by AnyJSON, and instead throw an AnyJSONUnimplementedException exception when called:

+ (id)JSONObjectWithStream:(NSInputStream *)stream
                   options:(NSJSONReadingOptions)opt
                     error:(NSError **)error

+ (NSInteger)writeJSONObject:(id)obj
                    toStream:(NSOutputStream *)stream
                     options:(NSJSONWritingOptions)opt
                       error:(NSError **)error

+ (BOOL)isValidJSONObject:(id)obj

Contact

License

AnyJSON is available under the MIT license. See the LICENSE file for more info.

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.