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

String escaping for the model parser and printer. #1549

Open
zrho opened this issue Oct 3, 2024 · 0 comments
Open

String escaping for the model parser and printer. #1549

zrho opened this issue Oct 3, 2024 · 0 comments
Assignees

Comments

@zrho
Copy link
Contributor

zrho commented Oct 3, 2024

No description provided.

@zrho zrho self-assigned this Oct 3, 2024
github-merge-queue bot pushed a commit that referenced this issue Nov 13, 2024
Metadata in `hugr-core` is attached to nodes and to `OpDef`s, consisting
of a map from string names to `serde_json::Value`s. On top of that,
`OpDef` also has a `description` field. This PR imports and exports node
metadata by serializing it to a JSON string and wrapping that string
with a `prelude.json` constructor. It also exports the metadata of
`OpDef`s, in which case the description field can be exported as a
string directly. This PR also introduces string escaping for the text
format (#1549).

By wrapping the metadata in a JSON type on the `hugr-model` side, we
leave open the option to have typed metadata via the usual term system
in the future.

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

No branches or pull requests

1 participant