Commit Graph

6 Commits

Author SHA1 Message Date
Eric cdba47becf
fix: force symbol resolution for types that serde de/serializes (#24)
* fix: force symbol resolution for types that serde de/serializes

Force symbols into scope when mixins are used with generic overloads. When mixins are used with generic overloads, the overloaded symbols in scope of the mixin are evaluated from the perspective of the mixin. This creates issues in downstream modules that may inadvertantly dispatch *only* to the symbols in the scope of the mixin, even when the module with the wrong symbol overloads is not imported. By forcing the compiler to use symbols for types handled by serde, we can be sure that these symbols are available to downstream modules. We can also be sure that these `fromJson` symbols can be overloaded where needed.

* remove enum forced scoping

Forcing a scoping for a particular enum type would only resolve that type and not all enum types.

* Add mixin + generic overloads as known issue to README

* try to fix URL reference to deserializer.nim
2024-05-21 12:39:47 +10:00
Eric b04435fb88
Change parseJson to JsonNode.parse (#4)
* Change parseJson to JsonNode.parse

Exporting `parseJson` causes symbol clashes in downstream repos that import std/json, so changing the signature completely avoid this clash.

* Fix usages of parseJson, update README
2024-02-09 11:08:14 +11:00
Eric bcabc173d4
Add overloading examples to README 2024-02-08 12:11:19 +11:00
Eric 88ce7fb56c
Fix README field options example 2024-02-08 08:09:26 +11:00
Eric f8260e9154
Update readme 2024-02-07 18:03:17 +11:00
Eric 5a8e85449d
Initial commit 2024-02-06 14:43:41 +11:00