brandonchinn178 / aeson-schemas

Easily consume JSON data on-demand with type-safety
http://hackage.haskell.org/package/aeson-schemas
BSD 3-Clause "New" or "Revised" License
52 stars 1 forks source link

Support phantom keys #30

Closed brandon-leapyear closed 4 years ago

brandon-leapyear commented 4 years ago

:sparkles: This is an old work account. Please reference @brandonchinn178 for all future communication :sparkles:


For a json blob

{
  "a": 1,
  "b": 2
}

the schema

{
  a: Int,
  [phantom]: {
    b: Int,
  }
}

should be valid, where .phantom.b resolves to the b key in the outer object.