serializr
    Preparing search index...

    Function raw

    • Indicates that this field is only need to putted in the serialized json or deserialized instance, without any transformations. Stay with its original value

      Parameters

      • OptionaladditionalArgs: AdditionalPropArgs

        optional object that contains beforeDeserialize and/or afterDeserialize handlers

      Returns PropSchema

      createModelSchema(Model, {
      rawData: raw(),
      })

      serialize(new Model({ rawData: { a: 1, b: [], c: {} } } }))
      // { "rawData": { a: 1, b: [], c: {} } } }