Expand description
The FHIR JSON representation shared by every version module.
Resources carry resourceType; a primitive element is a JSON value plus an
optional sibling named with a leading underscore that holds its id and
extension; repeating primitives are two arrays aligned with null;
integers and decimals are JSON numbers with their lexical form preserved;
objects and arrays are never empty; unknown properties are refused
(https://hl7.org/fhir/R4B/json.html).
Structs§
- Choice
Slot - The parts of one choice element met while reading an object.
- Decode
Error - A refused JSON document, located by its element path.
- Lexical
Error - A text outside the lexical form of a FHIR primitive, the form the
package’s
regexextension on<primitive>.valuestates (https://hl7.org/fhir/R4/datatypes.html#primitive). - NotA
Number - Text that is no JSON number.
- Number
- A JSON number, in the lexical form the document carried.
- Path
- The element path being decoded, for error reports.
- Primitive
Element - A primitive’s
_nameobject, written straight to a serializer. - Primitive
Elements - The
_namearray of a repeating primitive,nullat a position that carries noidand noextension. - Primitive
Value - A primitive’s value, written straight to a serializer.
- Primitive
Values - The value array of a repeating primitive,
nullat a position that carries only anidor anextension.
Enums§
- Decode
Error Kind - Why a JSON document was refused.
- Encode
Error - Why a value could not be written as JSON.
- Value
- A JSON document, with every number kept in its lexical form.
- Value
Conversion Error - Why a
Valuehas noserde_json::Valueform.
Traits§
- Json
- A type with a FHIR JSON representation as an object.
- Primitive
- A FHIR primitive: a JSON value plus an optional element object.
Functions§
- boxed
- Decodes a resource straight into a box.
- decimal_
value - A decimal’s lexical form as a JSON number.
- element_
entry - Writes
keywith the primitive’s_nameobject, unless it carries noidand noextension. - element_
list_ entry - Writes
keywith the_namearray of a repeating primitive, when any position carries anidor anextension. - expect_
array - Reads a non-empty JSON array.
- expect_
bool - Reads a JSON boolean.
- expect_
decimal - Reads a JSON number keeping its lexical form, for the FHIR decimal.
- expect_
i32 - Reads a JSON number as an
i32. - expect_
i64_ string - Reads a 64-bit integer carried as a JSON string (the R5
integer64form). - expect_
object - Reads a non-empty JSON object.
- expect_
single - Refuses an array where a single value is expected.
- expect_
string - Reads a JSON string.
- expect_
u32 - Reads a JSON number as a
u32, at leastmin. - pair_
arrays - Pairs a repeating primitive’s value array with its
_namearray. - primitive_
arrays - Serializes a list of primitives as the value array, when any carries a
value, and the aligned
_namearray, when any carries an element object. - resource_
type - The
resourceTypeof an object, for dispatch. - value_
entry - Writes
keywith the primitive’s value, unless it carries none. - value_
list_ entry - Writes
keywith the value array of a repeating primitive, when any position carries a value.