Skip to content

Instantly share code, notes, and snippets.

@edrex
Last active December 7, 2016 19:16
Show Gist options
  • Save edrex/23b4ff9739ee1a83108d3ecdcbffb00b to your computer and use it in GitHub Desktop.
Save edrex/23b4ff9739ee1a83108d3ecdcbffb00b to your computer and use it in GitHub Desktop.
import Json.Decode as Json exposing (..)
j = "{\"value\":\"{\\\"foo\\\":\\\"bar\\\"}\"}"
decodeString (object1 (decodeString (at ["foo"] string)) (at ["value"] string)) j
-- Ok (Ok "bar") : Result.Result String (Result.Result String String)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment