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

JsonSerializer and References #1458

Open
cdietrich opened this issue Apr 18, 2024 · 2 comments
Open

JsonSerializer and References #1458

cdietrich opened this issue Apr 18, 2024 · 2 comments

Comments

@cdietrich
Copy link
Contributor

cdietrich commented Apr 18, 2024

Currenty the JsonSerializer can't (de)serialize References that cannot be resolved.
It would be nice to have an flag in the JsonSerializeOptions to omit serializing the reference?

do i overlook something that makes this impossible?
(am not sure about the derserialization aspects)

our usecase is to test the parser. there we care about the ast structure only and not any errors in resolving

@msujew
Copy link
Contributor

msujew commented Apr 18, 2024

Just to clear things up, because I haven't tried it yet. Does the JsonSerializer throw an error when trying to serialize a non-resolved reference?

@cdietrich
Copy link
Contributor Author

cdietrich commented Apr 18, 2024

no but it includes

{
 "ref": Object {
"$refRef": b, 
           "$error": "Could not resolve reference to NamedDotTargetReference named 'b'.",
            }
}

but we dont care about $error (or the uri) when asserting on the ast

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

2 participants