[#171] Unify aeson instances generation and drop aeson-options
Description
Problem:
In many cases we use aeson
's defaultOptions
, in one place we use
defaultOptions
from aeson-options
.
- It seems better to use consistent options unless there is a good reason to use something different somewhere (currently there are no such reasons).
-
aeson
'sdefaultOptions
is not quite good for us because usually our record fields have prefixes derived from their names which are quite redundant in JSON.
Solution:
- Define
morleyAesonOptions
based onaeson-casing
. It drops prefix from record fields. Use it everywhere. - Remove
aeson-options
since it's not used anymore. - Update manually defined JSON encoding of
ContractState
to drop prefixes.
Related issue(s)
Resolves #171 (closed)
✅ Checklist for your Merge Request
Related changes (conditional)
-
Tests (see short guidelines)
-
If I added new functionality, I added tests covering it. -
If I fixed a bug, I added a regression test to prevent the bug from silently reappearing again.
-
-
Documentation
Stylistic guide (mandatory)
-
My commits comply with the following policy. -
My code complies with the style guide.
Edited by Ivan Gromakovskii