{"size": 912, "ext": "scrbl", "max_stars_repo_path": "doc/ported/json.scrbl", "max_stars_repo_name": "christoff-buerger/sagittarius-scheme", "max_stars_repo_stars_event_min_datetime": "2015-11-07T07:13:35.000Z", "max_stars_repo_stars_event_max_datetime": "2022-02-15T03:35:14.000Z", "max_issues_repo_path": "doc/ported/json.scrbl", "max_issues_repo_name": "christoff-buerger/sagittarius-scheme", "max_issues_repo_issues_event_min_datetime": "2016-04-28T21:59:59.000Z", "max_issues_repo_issues_event_max_datetime": "2021-07-01T08:42:21.000Z", "max_forks_repo_path": "doc/ported/json.scrbl", "max_forks_repo_name": "christoff-buerger/sagittarius-scheme", "max_forks_repo_forks_event_min_datetime": "2016-12-28T12:41:23.000Z", "max_forks_repo_forks_event_max_datetime": "2020-02-26T20:52:02.000Z"}
{"max_stars_count": 39, "max_issues_count": 3, "max_forks_count": 4, "avg_line_length": 28.5, "max_line_length": 80, "alphanum_fraction": 0.7171052632}
@; -*- mode:scribble; coding: utf-8 -*-

@subsection[:tag "ported.json"]{(json) -- JSON parser library}

@define[Library]{@name{(json)}}
@desc{This library is compatible with Chicken Scheme json module and provides
JSON reader and writer. The library is a thin wrapper of 
@secref["text.json"]{(text json)} library.
}

@define[Function]{@name{json-read} @args{:optional (port (current-input-port))}}
@desc{Reads JSON from given @var{port} and returns representing S-expression.

Conversion rules:
@codeblock{
JSON array   <-> list
JSON table   <-> vector
JSON boolean <-> boolean
JSON null    <-> symbol @code{null}
}

Read and write procedure always use above conversion rules even if 
@code{*json-map-type*} is set to @code{'alist}.

}

@define[Function]{@name{json-write}
 @args{json :optional (port (current-output-port))}}
@desc{Writes the given S-expression JSON representing object to given
@var{port}.
}
