Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

extractor: use lf-value-json for JSON-encoding DAML values #3066

Closed
S11001001 opened this issue Sep 27, 2019 · 0 comments · Fixed by #3121
Closed

extractor: use lf-value-json for JSON-encoding DAML values #3066

S11001001 opened this issue Sep 27, 2019 · 0 comments · Fixed by #3121

Comments

@S11001001
Copy link
Contributor

S11001001 commented Sep 27, 2019

Extractor contains its own local JSON encoder (with no paired decoder), used to encode contracts for storage in database. It is mostly like lf-value-json, but for the following:

lf-value-json is intended to be the uniform, intuitive JSON format for all LF values, and we want all applications to shift to using that encoding. Moreover, it includes a paired decoder, and is tested to injectively encode LF values. So we can replace the current bespoke Circe encoder in extractor with an adaptation of the spray-json encoder from lf-value-json to Circe's interface.

To match current behavior, we'd set encodeDecimalAsString = true, encodeInt64AsString = false.

This is a prerequisite for using extractor's database storage for enhancing json-api with SQL-backed queries, i.e. #2781.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant