Some real-world AP implementations don't properly indicate the extensions in use. Neither the type nor @context properties will accurately describe all properties. To support this, we should introduce the concept of an "anonymous extension". Anonymous extensions will not be converted automatically, and it will be up to application or extension code to recognize a valid object.
Once they do, however, conversion will work just as easily. Calling .As<> or similar should invoke some kind of TryExtendGraph or similar static method that validates the object shape and then constructs the new entity / object.
Some real-world AP implementations don't properly indicate the extensions in use. Neither the
type
nor@context
properties will accurately describe all properties. To support this, we should introduce the concept of an "anonymous extension". Anonymous extensions will not be converted automatically, and it will be up to application or extension code to recognize a valid object.Once they do, however, conversion will work just as easily. Calling
.As<>
or similar should invoke some kind ofTryExtendGraph
or similar static method that validates the object shape and then constructs the new entity / object.