JubeatPlus 3.9.11
Loading...
Searching...
No Matches
CJSONDeserializer Class Reference

Turns JSON data into Foundation objects. More...

#include <CJSONDeserializer.h>

Inheritance diagram for CJSONDeserializer:
Collaboration diagram for CJSONDeserializer:

Instance Methods

(instancetype) - init
 Builds a deserialiser.
(nullable id) - deserialize:error:
 Deserialises to whatever the JSON describes.
(nullable NSDictionary *) - deserializeAsDictionary:error:
 Deserialises, requiring a dictionary at the top level.
(nullable NSArray *) - deserializeAsArray:error:
 Deserialises, requiring an array at the top level.

Class Methods

(instancetype) + deserializer
 A new autoreleased deserialiser.

Properties

CJSONScanner * scanner
 The scanner that does the work, built on first use.
id nullObject
 What a JSON null becomes.
NSUInteger allowedEncoding
 Which text encoding the input is allowed to be in.
NSUInteger options
 Deserialisation options.

Detailed Description

Turns JSON data into Foundation objects.

Method Documentation

◆ deserialize:error:

- (nullable id) deserialize: (nullable NSData *) data
error: (NSError *__autoreleasing *) outError 

Deserialises to whatever the JSON describes.

Nil and empty input are the same case, and both are reported as error -11 rather than as an empty result.

Parameters
dataThe JSON text.
outErrorWhere to report a parse failure.
Returns
The parsed object, or nil.
Ghidra address:
0x63718

◆ deserializeAsArray:error:

- (nullable NSArray *) deserializeAsArray: (nullable NSData *) data
error: (NSError *__autoreleasing *) outError 

Deserialises, requiring an array at the top level.

Parameters
dataThe JSON text.
outErrorWhere to report a parse failure.
Returns
The parsed array, or nil.
Ghidra address:
0x639c8

◆ deserializeAsDictionary:error:

- (nullable NSDictionary *) deserializeAsDictionary: (nullable NSData *) data
error: (NSError *__autoreleasing *) outError 

Deserialises, requiring a dictionary at the top level.

Parameters
dataThe JSON text.
outErrorWhere to report a parse failure.
Returns
The parsed dictionary, or nil.
Ghidra address:
0x63870

◆ deserializer

+ (instancetype) deserializer

A new autoreleased deserialiser.

Returns
The deserialiser.
Ghidra address:
0x63504
Ghidra address:
0x63504

◆ init

- (instancetype) init

Builds a deserialiser.

The scanner is not created here.

Returns
The initialised deserialiser.
Ghidra address:
0x6352c
Ghidra address:
0x6352c

Property Documentation

◆ allowedEncoding

- (NSUInteger) allowedEncoding
readwritenonatomicassign

Which text encoding the input is allowed to be in.

Also stored on the scanner rather than here.

Ghidra address:
0x63684 (getter)
Ghidra address:
0x63684

◆ nullObject

- (id) nullObject
readwritenonatomicstrong

What a JSON null becomes.

Stored on the scanner, not here — the property has no backing ivar in the metadata.

Ghidra address:
0x635c4 (getter)
Ghidra address:
0x635c4

◆ options

- (NSUInteger) options
readwritenonatomicassign

Deserialisation options.

Unlike the two above, this one does have its own ivar — and nothing in the class reads it.

Ghidra address:
0x63b34 (getter)

◆ scanner

- (CJSONScanner *) scanner
readwritenonatomicstrong

The scanner that does the work, built on first use.

Ghidra address:
0x63564 (getter)
Ghidra address:
0x63564

The documentation for this class was generated from the following files: