Skip to content

packages/@git/url_2d3c37c690c0fa115be1/0.0.0-git.a39fc582565d4fca40be4f75fa304d71adc69301/contracts.aug ​

JSON benchmark · Dependency source and specification

This is the exact dependency version used by this example.

Code ​

aug
// Generated by aug spec. This is a copy of the installed dependency source.
extern C value pure _aug_json_parse(string input) returns Json unless JsonError
/** Parse strict UTF-8 JSON. Duplicate keys, invalid Unicode, oversized integers, and nesting beyond 64 levels raise JsonError. */
parse(string input) returns Json unless JsonError:
    unsafe:
        return _aug_json_parse(input)
aug
// Generated by aug spec. This is a copy of the installed dependency source.
extern C value pure _aug_json_parse(string input) returns Json unless JsonError
/** Parse strict UTF-8 JSON. Duplicate keys, invalid Unicode, oversized integers, and nesting beyond 64 levels raise JsonError. */
parse(string input) returns Json unless JsonError {
    unsafe {
        return _aug_json_parse(input)
    }
}

Compiled specification ​

Interactions and sequences

parse · source ​

Parse strict UTF-8 JSON. Duplicate keys, invalid Unicode, oversized integers, and nesting beyond 64 levels raise JsonError. It takes input as a string. Failures can raise JsonError.

Within an unsafe block, it returns _aug_json_parse with input. Native operations must satisfy their declared C contracts. source

Checked interface
text
parse(string input) returns Json unless JsonError

It takes input as a string. Failures can raise JsonError.

_aug_json_parse · source ​

It is private to its defining scope. It takes input as a string. It returns Json. Failures can raise JsonError.

Native C implementation; only its declared contract is visible here.

Last updated:

The world runs on language