What to do about VJSON
?
#585
Labels
API
API issue
frontend
Affects/is affected by the web frontend
question
This issue is a question, not a bug or feature request
serialization
Serialization (e.g., to/from JSON)
In this discussion thread, we proposed removing our
VJSON
type alias, which we originally created to work around some Haskell -> PureScript serialization issues in our Vonnegut prototype:primer/primer/src/Primer/JSON.hs
Line 13 in b4a5c65
However, having briefly revisited this idea this evening, I wonder if we should keep it. I think, at the very least, the
StripPrefixAndStartLowercase
field label modifier will be useful to eliminate the redundancy imposed by Haskell's need for unambiguous field selectors inEval.hs
. (I experimented with removing these redundant prefixes viaDuplicateRecordFields
, but unless I'm missing something obvious, this change would make at least our eval tests cumbersome to write due to ambiguous selectors.)However, we may no longer care about the
NoAllNullaryToStringTag
modifier, since we originally introduced that for compatibility withpurescript-foreign-generic
, and TypeScript should handle string enums just fine, as far as I'm aware (assuming Orval can generate nice TypeScript types for them).Regardless, if we do keep it, we should rename it. I propose something like
PrimerJSON
.The text was updated successfully, but these errors were encountered: