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

add support for conduit_json_external protocol #1162

Merged
merged 16 commits into from
Sep 1, 2023

Conversation

cyrush
Copy link
Member

@cyrush cyrush commented Aug 27, 2023

to_json gains new protocol (conduit_json_external) that embeds the address of each leaf in its schema.
When parsing, conduit_json handles schemas with optional address entry.

With this:

Node n, n2;
std::string json = n.to_json("conduit_json_external");

// the following are equivalent:
n2.set_external(n);
n2.parse(json,"conduit_json")

Also includes changes to improve performance of a few json parsing cases, avoiding intermediate copies and some intermediate use of json strings.

@cyrush cyrush merged commit a6b0b17 into develop Sep 1, 2023
21 checks passed
@cyrush cyrush deleted the task/2023_08_conduit_json_external branch September 1, 2023 16:00
@cyrush
Copy link
Member Author

cyrush commented Sep 1, 2023

@mathstuf @ChristosT

It has been a bit since we discussed this, but this new feature will allow you to use a json string rep to fully describe an in-memory node and replicate as a new node with external data. This should help with your use case of passing data between to library instances.

Let me know if you have any questions or hit roadblocks for that case.

@mathstuf
Copy link
Contributor

mathstuf commented Sep 1, 2023

Thanks! We now support external Conduit, so things should be flexible enough. However, this can help with the "I'm stuck with a conduit and internal-conduit catalyst, how can I make the best of this situation" case.

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

Successfully merging this pull request may close these issues.

2 participants