This issue is blocked by #37. It would probably be a good idea to do #83 first.
Clarification and motivation
The JSON representation of the web API leaks a lot of internal details about our data structures. For example, the /view endpoint leaks a lot of haskell field names such as dEntries and unEntryPath and haskell constructor names such as VRDirectory:
This issue is blocked by #37. It would probably be a good idea to do #83 first.
Clarification and motivation
The JSON representation of the web API leaks a lot of internal details about our data structures. For example, the
/view
endpoint leaks a lot of haskell field names such asdEntries
andunEntryPath
and haskell constructor names such asVRDirectory
:In some cases, it's just a matter of using the right functions for renaming fields (e.g. with the
aeson-casing
package):In other cases, the instances should be handcrafted. E.g., the entry path should be rendered as
"/dir/entry3"
rather than:Acceptance criteria
ToJSON
instances don't print any haskell specific details.FromJSON
instances are needed or used at this point. If they are needed,ToJSON
andFromJSON
should roundtrip.