Header menu logo issie

JsonHelpers Module

Types

Type Description

JSONCanvasState

SavedCanvasUnknownWaveInfo<'T>

SavedInfo

Functions and values

Function or value Description

convStateToJC (compL, connL)

Full Usage: convStateToJC (compL, connL)

Parameters:
Returns: Component list * 'a

converts Component to JSONComponent.Component for saving as JSON. this conversion does not affect the JSON generated.

compL : Component list
connL : 'a
Returns: Component list * 'a

extraCoder

Full Usage: extraCoder

Returns: ExtraCoders
Returns: ExtraCoders

jsonStringToState jsonString

Full Usage: jsonStringToState jsonString

Parameters:
    jsonString : string

Returns: Result<SavedInfo, string>
jsonString : string
Returns: Result<SavedInfo, string>

stateToJsonString (cState, waveInfo, sheetInfo)

Full Usage: stateToJsonString (cState, waveInfo, sheetInfo)

Parameters:
Returns: string

Code to convert a CanvasState to a JSON string, does not work for bigints (I think).

cState : CanvasState
waveInfo : SavedWaveInfo option
sheetInfo : SheetInfo option
Returns: string

stateToJsonStringExperimental (cState, waveInfo, sheetInfo)

Full Usage: stateToJsonStringExperimental (cState, waveInfo, sheetInfo)

Parameters:
Returns: string

Code to convert a CanvasState to a JSON string, allowing bigints

cState : CanvasState
waveInfo : SavedWaveInfo option
sheetInfo : SheetInfo option
Returns: string

Type something to start searching.