Closed justinwoo closed 6 years ago
You mean to read things like uppercase keys?
My solution so far has been to newtype the problematic record and:
derive instance genericFoo :: Generic Foo _
instance readForeignFoo :: ReadForeign Foo where
readImpl = genericDecode (defaultOptions { fieldTransform=toUpper, unwrapSingleConstructors=true })
What do you have in mind?
Yeah, I was thinking that at some level or at a leaf, all the keys would be transformable in some way like that that it might be worthwhile to be able to easily put a record newtype there or something. Don't know for sure though.
Eh, probably not needed since you can always "DFSDFDF"
for keys
We should probably have this since the symbol is reflected to grab the value out of the foreign object anyway.