SBJSON
@interface SBJSON : SBJsonBase <SBJsonParser, SBJsonWriter> {
SBJsonParser *jsonParser;
SBJsonWriter *jsonWriter;
}
@brief Facade for SBJsonWriter/SBJsonParser.
Requests are forwarded to instances of SBJsonWriter and SBJsonParser.
-
Undocumented
Declaration
Objective-C
SBJsonParser *jsonParser
-
Undocumented
Declaration
Objective-C
SBJsonWriter *jsonWriter
-
Return the fragment represented by the given string
Declaration
Objective-C
- (id)fragmentWithString:(NSString *)jsonrep error:(NSError **)error;
Swift
func fragment(with jsonrep: String!) throws -> Any
-
Return the object represented by the given string
Declaration
Objective-C
- (id)objectWithString:(NSString *)jsonrep error:(NSError **)error;
Swift
func object(with jsonrep: String!, error: ()) throws -> Any
-
Parse the string and return the represented object (or scalar)
Declaration
Objective-C
- (id)objectWithString:(id)value allowScalar:(BOOL)x error:(NSError **)error;
Swift
func object(withString value: Any!, allowScalar x: Bool) throws -> Any
-
Return JSON representation of an array or dictionary
Declaration
Objective-C
- (NSString *)stringWithObject:(id)value error:(NSError **)error;
Swift
func string(with value: Any!, error: ()) throws -> String
-
Return JSON representation of any legal JSON value
Declaration
Objective-C
- (NSString *)stringWithFragment:(id)value error:(NSError **)error;
Swift
func string(withFragment value: Any!) throws -> String
-
Return JSON representation (or fragment) for the given object
Declaration
Objective-C
- (NSString *)stringWithObject:(id)value allowScalar:(BOOL)x error:(NSError **)error;
Swift
func string(with value: Any!, allowScalar x: Bool) throws -> String