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

CPS-0011? | Universal JSON Encoding for Domain Types #742

Merged
merged 11 commits into from
Mar 1, 2024

Conversation

klntsky
Copy link
Contributor

@klntsky klntsky commented Jan 10, 2024

Cardano domain types have canonical CDDL definitions (for every era), but when it comes to use in web apps, where JSON is the universally accepted format, there is no definite standard.

As a result, software solutions are incompatible with each other, and dApp developers are forced to write code for conversions that could in princible be unnecessary, because the semantics of different JSON layouts are often the same. In particular, this problem is very real when offchain libraries need to provide support for different query layer providers (examples: Lucid, Mesh.js, cardano-transaction-lib, Atlas).

The initiative to standardize query layers on Cardano is currently blocked due to absence of a standardized JSON data schema. However, such a schema would be useful in contexts other than query layers, which is the reason why this CPS is separate.

(proposal rendered from branch)

@Ryun1 Ryun1 added the Category: Tools Proposals belonging to the 'Tools' category. label Jan 11, 2024
CPS-XXXX/README.md Outdated Show resolved Hide resolved
CPS-XXXX/README.md Outdated Show resolved Hide resolved
@rphair rphair changed the title CPS-???? | Universal JSON Encoding for Domain Types CPS-0011? | Universal JSON Encoding for Domain Types Jan 23, 2024
Copy link
Collaborator

@rphair rphair left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agreed to promote at today's CIP meeting 🚀

CPS-XXXX/README.md Outdated Show resolved Hide resolved
@klntsky klntsky requested a review from rphair January 30, 2024 20:43
@rphair rphair self-assigned this Jan 31, 2024
Copy link
Collaborator

@rphair rphair left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@klntsky this looks fine from my level (not an implementor) and provides a good understanding of the problem. It passed @michaelpj's (edit: cursory) review (#742 (comment)) with only one change requested & done, so I have nothing further to add besides watching for consensus during further edits on the way to merging... great job with this 🚀

Would also like to see if & how this might relate to CIPs pending here:

CPS-0011/README.md Outdated Show resolved Hide resolved
CPS-0011/README.md Outdated Show resolved Hide resolved
@rphair rphair removed their assignment Jan 31, 2024
@rphair rphair requested review from KtorZ and Crypto2099 January 31, 2024 10:38
@michaelpj
Copy link
Contributor

Sorry, to be clear, I haven't reviewed this in detail. My comment was just a drive-by one.

Copy link
Collaborator

@Ryun1 Ryun1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe this to be a well written problem statement, happy to see it merged.

Copy link
Collaborator

@rphair rphair left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(operator error: redundant review)

@Ryun1
Copy link
Collaborator

Ryun1 commented Feb 4, 2024

One final comment from me (although raised by @Crypto2099)

Have we considered the use of JSON-LD for this standard?

@rphair rphair added the State: Last Check Review favourable with disputes resolved; staged for merging. label Feb 6, 2024
@Ryun1
Copy link
Collaborator

Ryun1 commented Feb 20, 2024

We will keep this open for a couple more days ahead of the next wallets working group call
as we will be discussing this CPS there as well potential solutions for it

@klntsky
Copy link
Contributor Author

klntsky commented Feb 21, 2024

@Ryun1 json-ld is not a schema language. See the original motivation for it: https://www.w3.org/DesignIssues/LinkedData.html

For governance metadata it may be a good choice, but in this case there simply wouldn't be any documents to interlink.

@rphair
Copy link
Collaborator

rphair commented Mar 1, 2024

@Ryun1 are we punting this until next meeting (https://hackmd.io/@cip-editors/83) or do you feel we are ready to merge this now?

@Ryun1
Copy link
Collaborator

Ryun1 commented Mar 1, 2024

We are good to merge 💪

@Ryun1 Ryun1 merged commit 670c7f4 into cardano-foundation:master Mar 1, 2024
@rphair rphair removed the State: Last Check Review favourable with disputes resolved; staged for merging. label Sep 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Category: Tools Proposals belonging to the 'Tools' category.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants