Skip to content

Commit 3d9d086

Browse files
committed
Fix #162
1 parent 1c69202 commit 3d9d086

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

docs/src/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,7 @@ semi-lazy parsing of JSON to the `JSON3.Object` or `JSON3.Array` types. The tech
180180
the *positions* of objects, arrays, and strings in a JSON structure, while avoiding the cost of *materializing* such
181181
objects. For "scalar" types (number, bool, and null), the values are parsed immediately and stored inline in the "tape". This can result in best of both worlds performance: very fast initial parsing of a JSON input, and very cheap access afterwards. It also enables efficiencies in workflows where only small pieces of a JSON structure are needed, because expensive objects, arrays, and strings aren't materialized unless accessed. One additional advantage this technique allows is strong typing of `JSON3.Array{T}`; because the type of each element is noted while parsing, the `JSON3.Array` object can then be constructed with the most narrow type possible without having to reallocate any underlying data (since all data is stored in a type-less "tape" anyway).
182182

183-
The `JSON3.Object` supports the `AbstactDict` interface, but is read-only (it represents a *view* into the JSON source input), thus it supports `obj[:x]` and `obj["x"]`, as well as `obj.x` for accessing fields. It supports `keys(obj)` to see available keys in the object structure. You can call `length(obj)` to see how many key-value pairs there are, and it iterates `(k, v)` pairs like a normal `Dict`. It also supports the regular `get(obj, key, default)` family of methods.
183+
The `JSON3.Object` supports the `AbstractDict` interface, but is read-only (it represents a *view* into the JSON source input), thus it supports `obj[:x]` and `obj["x"]`, as well as `obj.x` for accessing fields. It supports `keys(obj)` to see available keys in the object structure. You can call `length(obj)` to see how many key-value pairs there are, and it iterates `(k, v)` pairs like a normal `Dict`. It also supports the regular `get(obj, key, default)` family of methods.
184184

185185
The `JSON3.Array{T}` supports the `AbstractArray` interface, but like `JSON3.Object` is a *view* into the input JSON, hence is read-only. It supports normal array methods like `length(A)`, `size(A)`, iteration, and `A[i]` `getindex` methods.
186186

0 commit comments

Comments
 (0)