import type { NobjcObject } from "objc-js";
import type { _NSData } from "./NSData.js";
import type { _NSInputStream } from "./NSInputStream.js";
import type { _NSObject } from "./NSObject.js";
import type { _NSOutputStream } from "./NSOutputStream.js";
import type { NSJSONReadingOptions } from "./NSJSONReadingOptions.js";
import type { NSJSONWritingOptions } from "./NSJSONWritingOptions.js";
export declare class _NSJSONSerialization extends _NSObject {
    static alloc(): _NSJSONSerialization;
    static new(): _NSJSONSerialization;
    init(): _NSJSONSerialization;
    /**
     * Returns YES if the given object can be converted to JSON data, NO otherwise. The object must have the following properties: - Top level object is an NSArray or NSDictionary - All objects are NSString, NSNumber, NSArray, NSDictionary, or NSNull - All dictionary keys are NSStrings - NSNumbers are not NaN or infinity Other rules may apply. Calling this method or attempting a conversion are the definitive ways to tell if a given object can be converted to JSON data.
     */
    static isValidJSONObject$(obj: NobjcObject): boolean;
    /**
     * Generate JSON data from a Foundation object. If the object will not produce valid JSON then an exception will be thrown. Setting the NSJSONWritingPrettyPrinted option will generate JSON with whitespace designed to make the output more readable. If that option is not set, the most compact possible JSON will be generated. If an error occurs, the error parameter will be set and the return value will be nil. The resulting data is a encoded in UTF-8.
     */
    static dataWithJSONObject$options$error$(obj: NobjcObject, opt: NSJSONWritingOptions, error: NobjcObject | null): _NSData | null;
    /**
     * Create a Foundation object from JSON data. Set the NSJSONReadingAllowFragments option if the parser should allow top-level objects that are not an NSArray or NSDictionary. Setting the NSJSONReadingMutableContainers option will make the parser generate mutable NSArrays and NSDictionaries. Setting the NSJSONReadingMutableLeaves option will make the parser generate mutable NSString objects. If an error occurs during the parse, then the error parameter will be set and the result will be nil. The data must be in one of the 5 supported encodings listed in the JSON specification: UTF-8, UTF-16LE, UTF-16BE, UTF-32LE, UTF-32BE. The data may or may not have a BOM. The most efficient encoding to use for parsing is UTF-8, so if you have a choice in encoding the data passed to this method, use UTF-8.
     */
    static JSONObjectWithData$options$error$(data: _NSData, opt: NSJSONReadingOptions, error: NobjcObject | null): NobjcObject | null;
    /**
     * Write JSON data into a stream. The stream should be opened and configured. The return value is the number of bytes written to the stream, or 0 on error. All other behavior of this method is the same as the dataWithJSONObject:options:error: method.
     */
    static writeJSONObject$toStream$options$error$(obj: NobjcObject, stream: _NSOutputStream, opt: NSJSONWritingOptions, error: NobjcObject | null): number;
    /**
     * Create a JSON object from JSON data stream. The stream should be opened and configured. All other behavior of this method is the same as the JSONObjectWithData:options:error: method.
     */
    static JSONObjectWithStream$options$error$(stream: _NSInputStream, opt: NSJSONReadingOptions, error: NobjcObject | null): NobjcObject | null;
}
