json-schema-to-elm icon indicating copy to clipboard operation
json-schema-to-elm copied to clipboard

Investigate parsing of generic 'array' and 'object' types

Open dragonwasrobot opened this issue 7 years ago • 0 comments

Investigate whether there is a reasonable type+parser+decoder that can be generated from the generic types:

{ "type": "object" }

and

{ "type": "array" }

i.e. maybe some kind of restricted versions of Dict and List like:

type SimpleType
   = SimpleBoolean Bool
   | SimpleFloat Float
   | SimpleInteger Int
   | SimpleIntegerArray (List Int)
   | SimpleFloatArray (List Float)

type SimpleDict =
    Dict String SimpleType

type SimpleList =
    List SimpleType

dragonwasrobot avatar Apr 06 '18 10:04 dragonwasrobot