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

Paths are written for Mentions that are non-arguments but not read back in #728

Open
kwalcock opened this issue Mar 28, 2023 · 0 comments
Open

Comments

@kwalcock
Copy link
Member

For the JSON version of Mentions in processors, all values in the paths are written. When they are read back in, only those paths are used for which the mention is among the Mention's arguments.

      json \ "paths" match {
...
           mOp = findMention(mentionID, json, docMap)
            if mOp.nonEmpty
...
...
        json \ "arguments" match {
...
              if (mjson \ "id").extract[String] == mentionID
...

This means that a highly desired (by me) round-trip test is not possible:

  1. create mentions
  2. serialized them as json1
  3. read them back in
  4. serialize them as json2
  5. compare json1 and json2

I'm not sure what the paths are supposed to be. If the extra ones are some kind of artifact of Odin processing that can't be avoided, perhaps the ones not among the arguments should be abandoned for the JSON serialization.

I'd appreciate being filled in on how these fields are supposed to be related.

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