You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
At work we have a JSON schema which demands composite keys for objects of this form:
"<some integer>_<day>": ...
Now, we used the venerable toKey (n, d) = Text.pack (show n ++ '_' ++ show d) but this turned out out to show up in our profiling and really was taking 10% of our overall runtime! So we went for some cruel hack:
Unfortunately this results in invalid JSON as Encoding.day is wrapped into quotes! It would be really neat if we could access the unsafe stuff from Data.Aeson.Encoding.Builder to use the Day encoding without quotes.
The text was updated successfully, but these errors were encountered:
At work we have a JSON schema which demands composite keys for objects of this form:
Now, we used the venerable
toKey (n, d) = Text.pack (show n ++ '_' ++ show d)
but this turned out out to show up in our profiling and really was taking 10% of our overall runtime! So we went for some cruel hack:Unfortunately this results in invalid JSON as
Encoding.day
is wrapped into quotes! It would be really neat if we could access the unsafe stuff from Data.Aeson.Encoding.Builder to use theDay
encoding without quotes.The text was updated successfully, but these errors were encountered: