@dxos/echo
    Preparing search index...

    Variable fromJSONConst

    fromJSON: (
        json: unknown,
        options?: {
            database?: Database.Database;
            parent?: Obj.Unknown;
            refResolver?: Resolver;
            uri?: URI.URI;
        },
    ) => Promise<Obj.Unknown> = ...

    Creates an object from its json representation, performing schema validation. References and schemas will be resolvable if the refResolver is provided.

    The function must be async to support resolving the schema as well as the relation endpoints.

    Type declaration

      • (
            json: unknown,
            options?: {
                database?: Database.Database;
                parent?: Obj.Unknown;
                refResolver?: Resolver;
                uri?: URI.URI;
            },
        ): Promise<Obj.Unknown>
      • Parameters

        • json: unknown
        • Optionaloptions: {
              database?: Database.Database;
              parent?: Obj.Unknown;
              refResolver?: Resolver;
              uri?: URI.URI;
          }
          • Optionaldatabase?: Database.Database

            Database to associate with the object.

          • Optionalparent?: Obj.Unknown

            Parent entity to associate with the object (used when the JSON has no @parent). Changes the result of Obj.getParent.

          • OptionalrefResolver?: Resolver

            Resolver for references. Produces hydrated references that can be resolved.

          • Optionaluri?: URI.URI

            Override object URI. Changes the result of Obj.getURI.

        Returns Promise<Obj.Unknown>

    Async; O(n) schema decode plus resolver round trips for the type, relation endpoints and parent.