{"size": 1025, "ext": "scrbl", "max_stars_repo_path": "scribblings/json-pointer.scrbl", "max_stars_repo_name": "pmatos/json-pointer", "max_stars_repo_stars_event_min_datetime": "2017-12-24T07:17:11.000Z", "max_stars_repo_stars_event_max_datetime": "2021-03-24T18:34:01.000Z", "max_issues_repo_path": "scribblings/json-pointer.scrbl", "max_issues_repo_name": "pmatos/json-pointer", "max_issues_repo_issues_event_min_datetime": "2018-07-30T13:49:07.000Z", "max_issues_repo_issues_event_max_datetime": "2021-03-27T10:04:27.000Z", "max_forks_repo_path": "scribblings/json-pointer.scrbl", "max_forks_repo_name": "pmatos/json-pointer", "max_forks_repo_forks_event_min_datetime": "2021-03-24T10:53:51.000Z", "max_forks_repo_forks_event_max_datetime": "2021-03-24T10:53:51.000Z"}
{"max_stars_count": 2, "max_issues_count": 2, "max_forks_count": 1, "avg_line_length": 32.03125, "max_line_length": 225, "alphanum_fraction": 0.6858536585}
#lang scribble/manual

@require[@for-label[json-pointer
	            json
                    racket/base]]

@title[#:style "toc"]{json-pointer: Referring to bits of JSON}
@author[(author+email "Jesse Alama" "jesse@lisp.sh")]

@defmodule[json-pointer]

JSON Pointer @hyperlink[#:underline? #f "https://tools.ietf.org/html/rfc6901"]{(RFC 6901)} is a straightforward notation for referring to values embedded within a JSON document. Given a JSON object like this:

@verbatim{
    {
        "foo": 5,
        "bar": [ 1, 2 ]
    }
}

the JSON Pointer expression @tt{/foo} has the value @racket[5], whereas the expressions @tt{/bar/0} and @tt{/bar/1} have the values @racket[1] and @racket[2], respectively. @tt{/baz} and @tt{/bar/42} do not refer to anything.

Nothing terribly fancy is going on here: JSON Pointers are nothing more than Racket strings, and we work with @racket[jsexpr?] values.

@include-section["expr.scrbl"]

@include-section["parse.scrbl"]

@include-section["eval.scrbl"]

@include-section["license.scrbl"]
