Elm Exactly
Results / elm-json /

DecodeStringTest

elm-0.19.1 passelm-0.19.2 passelm-0.19.3 passlamdera-1.5.0 pass
`Json.Decode.string` decodes a JSON string literal to the Elm `String` it contains.

Results

elm-0.19.1

passran in 76 ms
Output
Compiled in DEV mode. Follow the advice at https://elm-lang.org/0.19.1/optimize for better performance and smaller assets.
decode_string: Ok "hello"

elm-0.19.2

passran in 72 ms
Output
Compiled in DEV mode. Follow the advice at https://elm-lang.org/0.19.2/optimize for better performance and smaller assets.
decode_string: Ok "hello"

elm-0.19.3

passran in 81 ms
Output
Compiled in DEV mode. Follow the advice at https://elm-lang.org/0.19.3/optimize for better performance and smaller assets.
decode_string: Ok "hello"

lamdera-1.5.0

passran in 79 ms
Output
decode_string: Ok "hello"

Discussions

Discuss this test·Search the discussions on GitHub

Discussions are on GitHub; one about this test has [t:elm-json/DecodeStringTest] in its title.

Source

The -- CHECK: lines give the expected output.

module DecodeStringTest exposing (main)
{-| `Json.Decode.string` decodes a JSON string literal to the Elm `String` it contains.
-}
-- CHECK: decode_string: Ok "hello"
import Html exposing (text)
import Json.Decode as Decode
main =
let
_ = Debug.log "decode_string" (Decode.decodeString Decode.string "\"hello\"")
in
text "done"