Closed didimitrie closed 5 years ago
@didimitrie , not uber-familiar with how you handle deserialisation (catching up with things) but i can't find a mention of TypeNameHandling.All
in the repo, is adding _type
a similar solution to what this option in the Newtonsoft does ?
It's layered and probs the not the most efficient way, but it explicitly works nicely and the exposure to devs is cool.
Flow:
Native Object -> SpeckleObject -> Json -> Payload -> Server -> hopefully db
Native Object -> SpeckleObject:
_type
just keeps track in speckle abstract objects of where they come from and what's their name, together with assembly
. It's not complete, but have a look at https://speckle.works/blog/schemasandstandards/
This issue is partially fixed in @jmirtsch 's branch... which i have to check, and with whom i'm chatting atm too, so it's all very confusing
This has been partly addressed on the https://github.com/speckleworks/SpeckleCore/tree/Dimitrie/dev/localdb-sqlite branch, as now if no exact match was found (assembly name and version), it will search just by assembly name.
So even if there's different libs, we can ask devs to use the same assembly name between them, otherwise the SpeckleAbstract
type gets messy.
This would allow for objects to be deserialised to native types even if the assembly name differs, as the case might be when producing libraries for various applications that don't share a
core
lib