Try Install Learn Blog API Packages GitHub
Pages
Standard Library

Search
Entities

Json

Functions

parse
(
input
:
String
)
:
Maybe(Object)

Parses a string into an Object, returns Maybe.nothing() if the parsing failed.

Json.parse("{}") == Maybe.just(`{}`)
Json.parse("{") == Maybe.nothing()
stringify
(
input
:
Object
)
:
String

Stringifies an Object into JSON string.

Json.stringify(`{ a: "Hello" }`) == "{ \"a\": \"Hello\" }"