Skip to main content

CraftingJSON

Namespace for encoding & decoding crafting inventories to and from JSON

Index

Interfaces

DataDecoded

DataDecoded:

crafts

crafts: CraftingItem[]

version

version: 1

The version of the file format

DataEncoded

DataEncoded:

The data structure as returned by CraftingJSON.encode

crafts

crafts: string[]

A list of base64-encoded CraftingItem object strings or null if the craft is empty

date

date: string

The date & time on which the crafts were exported (see Date.toLocaleString)

version

version: 1

The version of the file format

ParsingOutputBase

ParsingOutputBase:

optionaldata

The decoded crafted item JSON data

optionalerrors

errors?: Set<number>

All crafted item indices within the data.crafts list that encountered a critical error during their validation

status

The status code

ParsingOutputErr

ParsingOutputErr:

optionaldata

data?: never

The decoded crafted item JSON data

optionalerrors

errors?: never

All crafted item indices within the data.crafts list that encountered a critical error during their validation

status

status: 0

The status code

ParsingOutputOk

ParsingOutputOk:

data

The decoded crafted item JSON data

errors

errors: Set<number>

All crafted item indices within the data.crafts list that encountered a critical error during their validation

status

status: 1 | 2

Type Aliases

ParsingOutput

A status object based on the stringified JSON data as decoded by CraftingJSON.decode