justinwoo / purescript-simple-json

A simple Purescript JSON library that uses types automatically
http://purescript-simple-json.readthedocs.io
MIT License
133 stars 45 forks source link

add nullable instance #17

Closed justinwoo closed 7 years ago

jacereda commented 7 years ago

Looks good.

justinwoo commented 7 years ago

Updated this to actually require that the field be null and not just undefined, throwing a type mismatch error of Nullable a Undefined in that case.

jacereda commented 7 years ago

Looks good, but shouldn't -foreign provide readNullable?

justinwoo commented 7 years ago

Nullable is from https://pursuit.purescript.org/packages/purescript-nullable/3.0.0/docs/Data.Nullable and it doesn't really come with anything though