# Minimal JSON round-trip with external/library references produces unresolved-reference warnings and non-identical derived relationships after reconstruction

**URL:** https://forum.sensmetry.com/t/minimal-json-round-trip-with-external-library-references-produces-unresolved-reference-warnings-and-non-identical-derived-relationships-after-reconstruction/505
**Category:** Bug Reports
**Tags:** automator
**Created:** [June 13, 2026, 6:00am UTC](https://forum.sensmetry.com/t/minimal-json-round-trip-with-external-library-references-produces-unresolved-reference-warnings-and-non-identical-derived-relationships-after-reconstruction/505 "2026-06-13T06:00:51Z")
**Posts on this page:** 1
**Showing post:** 6

<div class="post-metadata">

### Author: ![Robert\_Karban](https://yyz2.discourse-cdn.com/flex008/user_avatar/forum.sensmetry.com/robert_karban/32/119_2.png) [@Robert\_Karban](https://forum.sensmetry.com/u/Robert_Karban)
#### Post date: [July 23, 2026, 11:00pm UTC](https://forum.sensmetry.com/t/minimal-json-round-trip-with-external-library-references-produces-unresolved-reference-warnings-and-non-identical-derived-relationships-after-reconstruction/505/6 "2026-07-23T23:00:23Z")

</div>

Hi,

We are now seeing this on Syside 0.10.3.

This appears related to the same family of issues discussed in:

- Json serialization/deserialization is not symmetric ( [Json serialization/deserialization is not symmetric](https://forum.sensmetry.com/t/json-serialization-deserialization-is-not-symmetric/234) )

- Minimal JSON round-trip with external/library references produces unresolved-reference warnings and non-identical derived relationships after reconstruction

Our current setup:

- We use external/user libraries that are installed separately from the main model.
- For text → JSON, we provide those installed library models as an auxiliary environment.
- On Syside 0.10.3, that makes serialization/commit work correctly.

However, for JSON → text, we still see failures unless we explicitly rebuild and reapply the same auxiliary environment during deserialization/linking/resolution.

Observed failure:

- opening a committed model as textual SysML fails with
  - RuntimeError: NamespaceImport is missing target reference

What fixes it on our side:

1. load installed library models textually
2. build an environment from them
3. use project-style syside.json.loads([…])
4. populate IdMap with both environment docs and deserialized docs
5. call link(…)
6. run syside.Sema().resolve(…, env.index(), env.lib)
7. only then pretty-print to SysML text

So the question is:

On Syside 0.10.3, is this now the expected/supported pattern for JSON→SysML reconstruction when external user libraries are involved?

In other words, should callers always expect to explicitly reconstruct and inject the external-library environment for JSON-\>text, even if those referenced library elements  
are otherwise available in Syside’s broader environment?

This seems consistent with topic 505’s guidance that json.loads(…) alone is not sufficient for external references, but I want to confirm whether this is the intended API  
contract in 0.10.3 rather than just a workaround.

If useful, I can provide a minimal reproducer with:

- one user library package
- one model importing it
- successful text → JSON
- failing JSON → text without auxiliary environment
- successful JSON → text after explicit environment load + link(…) + Sema.resolve(…)

---

_[View the full topic](https://forum.sensmetry.com/t/minimal-json-round-trip-with-external-library-references-produces-unresolved-reference-warnings-and-non-identical-derived-relationships-after-reconstruction/505)._
