Core Module
Low-level byte reading and writing primitives shared by the JSON and XML runtimes.
Types and nested modules
| Type/Module | Description |
|
Functional helpers over `ByteSource`. |
|
|
A lightweight context for reading bytes. |
|
|
Abstraction for writing bytes, to be implemented per target platform. |
|
|
Growable in-memory byte buffer used by the built-in codecs. |
Functions and values
| Function or value |
Description
|
Full Usage:
isEmptyCollectionValue value
Parameters:
obj
Returns: bool
|
Field-policy wrappers sometimes need to distinguish explicit empty collections from non-empty ones without caring about the concrete type.
|
Full Usage:
parseByteInvariant typeName token
Parameters:
string
token : string
Returns: byte
|
|
Full Usage:
parseDateTimeOffsetRoundtripInvariant text
Parameters:
string
Returns: DateTimeOffset
|
The package consumer path exercises the published Fable runtime rather than the local source build, so `DateTimeOffset` parsing needs the same fallback to avoid importing helpers that the package does not ship.
|
|
Fable's packaged `fable-library-js` surface does not currently expose the `ParseExact` helpers for date/time types, so the shared schemas need one portable entry point that preserves exact parsing on .NET and compatible parsing on Fable.
|
Full Usage:
parseDecimalInvariant typeName token
Parameters:
string
token : string
Returns: decimal
|
|
Full Usage:
parseDecimalInvariantBytes typeName data offset length
Parameters:
string
data : byte[]
offset : int
length : int
Returns: decimal
|
Decimal parsing follows the same byte-level path so JSON numeric decode stays symmetric with the existing integer fast paths on .NET.
|
Full Usage:
parseFloatInvariant typeName token
Parameters:
string
token : string
Returns: float
|
|
Full Usage:
parseFloatInvariantBytes typeName data offset length
Parameters:
string
data : byte[]
offset : int
length : int
Returns: float
|
The handwritten JSON parser already identifies numeric token bounds in the UTF-8 source, so the .NET fast path can parse directly from bytes and avoid allocating transient strings for every float and decimal.
|
Full Usage:
parseInt16Invariant typeName token
Parameters:
string
token : string
Returns: int16
|
|
Full Usage:
parseInt32Invariant typeName token
Parameters:
string
token : string
Returns: int
|
|
Full Usage:
parseInt32InvariantBytes typeName data offset length
Parameters:
string
data : byte[]
offset : int
length : int
Returns: int
|
|
Full Usage:
parseInt64Invariant typeName token
Parameters:
string
token : string
Returns: int64
|
|
Full Usage:
parseInt64InvariantBytes typeName data offset length
Parameters:
string
data : byte[]
offset : int
length : int
Returns: int64
|
|
Full Usage:
parseSByteInvariant typeName token
Parameters:
string
token : string
Returns: sbyte
|
|
|
`TimeSpan.ParseExact` hits the same missing-helper problem under Fable, while plain invariant parsing still accepts the canonical `"c"` payloads that the encoder emits.
|
Full Usage:
parseUInt16Invariant typeName token
Parameters:
string
token : string
Returns: uint16
|
|
Full Usage:
parseUInt32Invariant typeName token
Parameters:
string
token : string
Returns: uint32
|
|
Full Usage:
parseUInt32InvariantBytes typeName data offset length
Parameters:
string
data : byte[]
offset : int
length : int
Returns: uint32
|
|
Full Usage:
parseUInt64Invariant typeName token
Parameters:
string
token : string
Returns: uint64
|
|
Full Usage:
parseUInt64InvariantBytes typeName data offset length
Parameters:
string
data : byte[]
offset : int
length : int
Returns: uint64
|
|
Full Usage:
tryParseByteInvariant text
Parameters:
string
Returns: byte option
|
|
Full Usage:
tryParseDecimalInvariant
Returns: string -> decimal option
|
|
Full Usage:
tryParseFloatInvariant
Returns: string -> float option
|
|
Full Usage:
tryParseInt16Invariant text
Parameters:
string
Returns: int16 option
|
|
Full Usage:
tryParseInt32Invariant text
Parameters:
string
Returns: int option
|
|
Full Usage:
tryParseInt64Invariant text
Parameters:
string
Returns: int64 option
|
|
Full Usage:
tryParseSByteInvariant text
Parameters:
string
Returns: sbyte option
|
|
Full Usage:
tryParseUInt16Invariant text
Parameters:
string
Returns: uint16 option
|
|
Full Usage:
tryParseUInt32Invariant text
Parameters:
string
Returns: uint32 option
|
|
Full Usage:
tryParseUInt64Invariant text
Parameters:
string
Returns: uint64 option
|
|
CodecMapper