This module offers dynamic type guards for the for the JSON schema as specified in the Appendix E of the Marlowe specification.
import * as G from "@marlowe/language-core-v1/guards"const jsonObject = JSON.parse(fileContents)if (G.Contract.is(jsonObject)) { // The jsonObject respects the JSON schema for Contract} else { // The jsonObject does not respect the JSON schema for Contract} Copy
import * as G from "@marlowe/language-core-v1/guards"const jsonObject = JSON.parse(fileContents)if (G.Contract.is(jsonObject)) { // The jsonObject respects the JSON schema for Contract} else { // The jsonObject does not respect the JSON schema for Contract}
This module offers dynamic type guards for the for the JSON schema as specified in the Appendix E of the Marlowe specification.