JsonHelpers Module
Types
| Type | Description |
Functions and values
| Function or value | Description |
|
|
|
|
|
NB tryParseNativeAs, not tryParseAs. Both are SimpleJson and both end in the same AST-to-value conversion; they differ only in how the AST is built. tryParseAs uses Fable.Parsimmon parser combinators over the whole file and measured ~8x slower than the native JSON.parse variant - 59ms against 7ms on a 108KB sheet - and this function tries up to three types in turn, so it paid that cost more than once per sheet loaded. The two were checked to agree on every demo sheet, for each of the three types below.
|
Full Usage:
stateToJsonString (cState, waveInfo, sheetInfo)
Parameters:
CanvasState
waveInfo : SavedWaveInfo option
sheetInfo : SheetInfo option
Returns: Result<string, string>
|
|
Full Usage:
stateToJsonStringExperimental (cState, waveInfo, sheetInfo)
Parameters:
CanvasState
waveInfo : SavedWaveInfo option
sheetInfo : SheetInfo option
Returns: Result<string, string>
|
|