Public Member Functions

<YAJLCoding> Protocol Reference

Custom objects can support manual JSON encoding. More...

#import <YAJLGen.h>

List of all members.

Public Member Functions

(id) - JSON
 Provide custom and/or encodable object to parse to JSON string.

Detailed Description

Custom objects can support manual JSON encoding.

 @interface CustomObject : NSObject
 @end
 
 @implementation CustomObject
 
 - (id)JSON {
 return [NSArray arrayWithObject:[NSNumber numberWithInteger:1]];
 }
 
 @end

And then:

 CustomObject *customObject = [[CustomObject alloc] init];
 NSString *JSONString = [customObject yajl_JSON];
 // JSONString == "[1]";

Member Function Documentation

- (id) JSON  

Provide custom and/or encodable object to parse to JSON string.

Returns:
Object encodable as JSON such as NSDictionary, NSArray, etc

The documentation for this protocol was generated from the following file:
 All Classes Functions Properties