Morph from a String
Broadens to a compact String.
To adjust format readability → stringBroadWith
Json.string Morph with adjustable indentation.
This is a bit clunky since stringBroadWith is using Json.Encode.encode.
I bet we could make this cleaner with a custom MorphRow
and a nice pretty-printable broad representation like the-sett/elm-pretty-printer.
A value from the javascript side:
from a port,
on init,
from elm/http, ...
Compiler magic. Not caseable. Elm crashes on ==.
Can include functions, proxies, getters, bigInts, anything
and.. of course this can be abused to break elm's promises 🙈, see for example
randomness without Cmd ellie
Morph to valid Json value format from JsValueMagic
About json numbers...
Float
as defined in the IEEE 754 standard
which is hardcoded into almost all CPUs.
This standard allows Infinity and NaN which the json.org spec does not include.elm/json silently encodes both as null.
This behavior matches JSON.stringify behavior in plain JSDecimalDecoders/Encoders can only handle Float range which dictates the range we can use for Decimals
With compact indexes. Use in combination with
Value.Morph.eachTagjust before chaining toValue.Morph.jsonpartMorphValueindex index in the buildervariantMorphValueindex in the builderValue.Morph.partorder → breaking changeValue.Morph.parts → no changeSee also
Value.Morph.descriptive