I have an API that forces me to return a JSON in the form of
{ Field1: "something"
, Field2: 12 }
However, I have failed to model this in Purescript so far.
I understand that the purescript grammar sees the upper case field names and thinks it is the type of a field without a field name. So I it is not straight forward to just encode a function like
test :: Number -> { Field1 :: String, Field2 :: Number }
Without resorting to using external javascript functions to change the object into something else, is it at all possible to construct a record with upper case field names in purescript? And if so, how?