@tsed/json-mapper 7.83.3 → 8.0.0-alpha.10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (99) hide show
  1. package/lib/browser/json-mapper.umd.min.js +1 -1
  2. package/lib/browser/json-mapper.umd.min.js.map +1 -1
  3. package/lib/esm/components/DateMapper.js.map +1 -1
  4. package/lib/esm/components/PrimitiveMapper.js.map +1 -1
  5. package/lib/esm/components/SymbolMapper.js.map +1 -1
  6. package/lib/esm/decorators/jsonMapper.js.map +1 -1
  7. package/lib/esm/decorators/onDeserialize.js.map +1 -1
  8. package/lib/esm/domain/JsonDeserializer.js.map +1 -1
  9. package/lib/esm/domain/JsonMapperCompiler.js.map +1 -1
  10. package/lib/esm/domain/JsonMapperTypesContainer.js.map +1 -1
  11. package/lib/esm/domain/JsonSerializer.js.map +1 -1
  12. package/lib/esm/domain/Writer.js +1 -2
  13. package/lib/esm/domain/Writer.js.map +1 -1
  14. package/lib/esm/utils/deserialize.js.map +1 -1
  15. package/lib/esm/utils/serialize.js.map +1 -1
  16. package/lib/types/utils/deserialize.d.ts +3 -3
  17. package/lib/types/utils/serialize.d.ts +3 -3
  18. package/package.json +19 -16
  19. package/lib/cjs/components/DateMapper.js +0 -30
  20. package/lib/cjs/components/DateMapper.js.map +0 -1
  21. package/lib/cjs/components/PrimitiveMapper.js +0 -64
  22. package/lib/cjs/components/PrimitiveMapper.js.map +0 -1
  23. package/lib/cjs/components/SymbolMapper.js +0 -24
  24. package/lib/cjs/components/SymbolMapper.js.map +0 -1
  25. package/lib/cjs/decorators/afterDeserialize.js +0 -39
  26. package/lib/cjs/decorators/afterDeserialize.js.map +0 -1
  27. package/lib/cjs/decorators/beforeDeserialize.js +0 -39
  28. package/lib/cjs/decorators/beforeDeserialize.js.map +0 -1
  29. package/lib/cjs/decorators/jsonMapper.js +0 -18
  30. package/lib/cjs/decorators/jsonMapper.js.map +0 -1
  31. package/lib/cjs/decorators/onDeserialize.js +0 -29
  32. package/lib/cjs/decorators/onDeserialize.js.map +0 -1
  33. package/lib/cjs/decorators/onSerialize.js +0 -29
  34. package/lib/cjs/decorators/onSerialize.js.map +0 -1
  35. package/lib/cjs/domain/JsonDeserializer.js +0 -295
  36. package/lib/cjs/domain/JsonDeserializer.js.map +0 -1
  37. package/lib/cjs/domain/JsonDeserializerOptions.js +0 -3
  38. package/lib/cjs/domain/JsonDeserializerOptions.js.map +0 -1
  39. package/lib/cjs/domain/JsonMapperCompiler.js +0 -167
  40. package/lib/cjs/domain/JsonMapperCompiler.js.map +0 -1
  41. package/lib/cjs/domain/JsonMapperGlobalOptions.js +0 -3
  42. package/lib/cjs/domain/JsonMapperGlobalOptions.js.map +0 -1
  43. package/lib/cjs/domain/JsonMapperSettings.js +0 -9
  44. package/lib/cjs/domain/JsonMapperSettings.js.map +0 -1
  45. package/lib/cjs/domain/JsonMapperTypesContainer.js +0 -23
  46. package/lib/cjs/domain/JsonMapperTypesContainer.js.map +0 -1
  47. package/lib/cjs/domain/JsonSerializer.js +0 -273
  48. package/lib/cjs/domain/JsonSerializer.js.map +0 -1
  49. package/lib/cjs/domain/JsonSerializerOptions.js +0 -3
  50. package/lib/cjs/domain/JsonSerializerOptions.js.map +0 -1
  51. package/lib/cjs/domain/Writer.js +0 -137
  52. package/lib/cjs/domain/Writer.js.map +0 -1
  53. package/lib/cjs/hooks/alterAfterDeserialize.js +0 -8
  54. package/lib/cjs/hooks/alterAfterDeserialize.js.map +0 -1
  55. package/lib/cjs/hooks/alterBeforeDeserialize.js +0 -8
  56. package/lib/cjs/hooks/alterBeforeDeserialize.js.map +0 -1
  57. package/lib/cjs/hooks/alterOnDeserialize.js +0 -8
  58. package/lib/cjs/hooks/alterOnDeserialize.js.map +0 -1
  59. package/lib/cjs/hooks/alterOnSerialize.js +0 -8
  60. package/lib/cjs/hooks/alterOnSerialize.js.map +0 -1
  61. package/lib/cjs/index.js +0 -32
  62. package/lib/cjs/index.js.map +0 -1
  63. package/lib/cjs/interfaces/JsonMapperMethods.js +0 -3
  64. package/lib/cjs/interfaces/JsonMapperMethods.js.map +0 -1
  65. package/lib/cjs/package.json +0 -3
  66. package/lib/cjs/utils/deserialize.js +0 -13
  67. package/lib/cjs/utils/deserialize.js.map +0 -1
  68. package/lib/cjs/utils/getObjectProperties.js +0 -9
  69. package/lib/cjs/utils/getObjectProperties.js.map +0 -1
  70. package/lib/cjs/utils/serialize.js +0 -13
  71. package/lib/cjs/utils/serialize.js.map +0 -1
  72. package/lib/esm/package.json +0 -3
  73. package/lib/types-esm/components/DateMapper.d.ts +0 -11
  74. package/lib/types-esm/components/PrimitiveMapper.d.ts +0 -18
  75. package/lib/types-esm/components/SymbolMapper.d.ts +0 -11
  76. package/lib/types-esm/decorators/afterDeserialize.d.ts +0 -33
  77. package/lib/types-esm/decorators/beforeDeserialize.d.ts +0 -33
  78. package/lib/types-esm/decorators/jsonMapper.d.ts +0 -7
  79. package/lib/types-esm/decorators/onDeserialize.d.ts +0 -23
  80. package/lib/types-esm/decorators/onSerialize.d.ts +0 -23
  81. package/lib/types-esm/domain/JsonDeserializer.d.ts +0 -33
  82. package/lib/types-esm/domain/JsonDeserializerOptions.d.ts +0 -28
  83. package/lib/types-esm/domain/JsonMapperCompiler.d.ts +0 -60
  84. package/lib/types-esm/domain/JsonMapperGlobalOptions.d.ts +0 -14
  85. package/lib/types-esm/domain/JsonMapperSettings.d.ts +0 -2
  86. package/lib/types-esm/domain/JsonMapperTypesContainer.d.ts +0 -10
  87. package/lib/types-esm/domain/JsonSerializer.d.ts +0 -22
  88. package/lib/types-esm/domain/JsonSerializerOptions.d.ts +0 -14
  89. package/lib/types-esm/domain/Writer.d.ts +0 -43
  90. package/lib/types-esm/hooks/alterAfterDeserialize.d.ts +0 -4
  91. package/lib/types-esm/hooks/alterBeforeDeserialize.d.ts +0 -4
  92. package/lib/types-esm/hooks/alterOnDeserialize.d.ts +0 -2
  93. package/lib/types-esm/hooks/alterOnSerialize.d.ts +0 -2
  94. package/lib/types-esm/index.d.ts +0 -28
  95. package/lib/types-esm/interfaces/JsonMapperMethods.d.ts +0 -28
  96. package/lib/types-esm/utils/deserialize.d.ts +0 -5
  97. package/lib/types-esm/utils/getObjectProperties.d.ts +0 -1
  98. package/lib/types-esm/utils/serialize.d.ts +0 -5
  99. /package/{webpack.config.js → webpack.config.cjs} +0 -0
@@ -1,11 +0,0 @@
1
- import { JsonMapperMethods } from "../interfaces/JsonMapperMethods.js";
2
- /**
3
- * Mapper for the `Symbol` type.
4
- *
5
- * @jsonmapper
6
- * @component
7
- */
8
- export declare class SymbolMapper implements JsonMapperMethods {
9
- deserialize(data: string): symbol;
10
- serialize(object: Symbol): any;
11
- }
@@ -1,33 +0,0 @@
1
- import { JsonHookContext } from "@tsed/schema";
2
- export interface AfterDeserializeCallback {
3
- (value: any, ctx: JsonHookContext): any;
4
- }
5
- /**
6
- * Call the function after JsonMapper.
7
- *
8
- * ## Example
9
- *
10
- * ```typescript
11
- * @AfterDeserialize((data: Model) => { // After deserialize get the instance class
12
- * if (data.prop1 === 'VALUE' && data.prop2 !== 'VALUE2') {
13
- * throw BadRequest('MyMessage'); // or throw a ValidationError
14
- * } else {
15
- * data.prop2 = 'VALUE2';
16
- * return data;
17
- * }
18
- * })
19
- * class Model {
20
- * @Property()
21
- * prop1: string;
22
- * @Property()
23
- * prop2: string;
24
- * }
25
- * ```
26
- *
27
- * @returns {Function}
28
- * @decorator
29
- * @schema
30
- * @property
31
- * @param cb
32
- */
33
- export declare function AfterDeserialize(cb: AfterDeserializeCallback): ClassDecorator;
@@ -1,33 +0,0 @@
1
- import { JsonHookContext } from "@tsed/schema";
2
- export interface BeforeDeserializeCallback {
3
- (value: any, ctx: JsonHookContext): any;
4
- }
5
- /**
6
- * Call the function before JsonMapper.
7
- *
8
- * ## Example
9
- *
10
- * ```typescript
11
- * @BeforeDeserialize((data: Record<string, unknown>) => { // Before deserialize get the data
12
- * if (data.prop1 === 'VALUE' && data.prop2 !== 'VALUE2') {
13
- * throw BadRequest('MyMessage'); // or throw a ValidationError
14
- * } else {
15
- * data.prop2 = 'VALUE2';
16
- * return data;
17
- * }
18
- * })
19
- * class Model {
20
- * @Property()
21
- * prop1: string;
22
- * @Property()
23
- * prop2: string;
24
- * }
25
- * ```
26
- *
27
- * @returns {Function}
28
- * @decorator
29
- * @schema
30
- * @property
31
- * @param cb
32
- */
33
- export declare function BeforeDeserialize(cb: BeforeDeserializeCallback): ClassDecorator;
@@ -1,7 +0,0 @@
1
- import { Type } from "@tsed/core";
2
- /**
3
- * Register a new JsonMapper Type
4
- * @param types
5
- * @constructor
6
- */
7
- export declare function JsonMapper(...types: (any | Type)[]): ClassDecorator;
@@ -1,23 +0,0 @@
1
- import { JsonHookContext } from "@tsed/schema";
2
- export interface OnDeserializeCallback {
3
- (value: any, ctx: JsonHookContext): any;
4
- }
5
- /**
6
- * Call the function before property deserialization.
7
- *
8
- * ## Example
9
- *
10
- * ```typescript
11
- * class Model {
12
- * @OnDeserialize(v => v + 1)
13
- * property: string;
14
- * }
15
- * ```
16
- *
17
- * @returns {Function}
18
- * @decorator
19
- * @schema
20
- * @property
21
- * @param cb
22
- */
23
- export declare function OnDeserialize(cb: OnDeserializeCallback): PropertyDecorator;
@@ -1,23 +0,0 @@
1
- import { JsonHookContext } from "@tsed/schema";
2
- export interface OnSerializeCallback {
3
- (value: any, ctx: JsonHookContext): any;
4
- }
5
- /**
6
- * Call the function before property serialization.
7
- *
8
- * ## Example
9
- *
10
- * ```typescript
11
- * class Model {
12
- * @OnSerialize(v => v + 1)
13
- * property: string;
14
- * }
15
- * ```
16
- *
17
- * @returns {Function}
18
- * @decorator
19
- * @schema
20
- * @property
21
- * @param cb
22
- */
23
- export declare function OnSerialize(cb: OnSerializeCallback): PropertyDecorator;
@@ -1,33 +0,0 @@
1
- import { Type } from "@tsed/core";
2
- import { JsonDeserializerOptions } from "./JsonDeserializerOptions.js";
3
- import { CachedJsonMapper, JsonMapperCompiler } from "./JsonMapperCompiler.js";
4
- export declare class JsonDeserializer extends JsonMapperCompiler<JsonDeserializerOptions> {
5
- /**
6
- * Cached classes by his id
7
- * @protected
8
- */
9
- protected constructors: Record<string, Type<any>>;
10
- constructor();
11
- map<Model = any>(input: any, options?: JsonDeserializerOptions): Model;
12
- compile(model: Type<any>, groups: false | string[]): CachedJsonMapper<JsonDeserializerOptions>;
13
- eval(mapper: string, { id, groupsId, model }: {
14
- id: string;
15
- model: Type<any>;
16
- groupsId: string;
17
- }): CachedJsonMapper<JsonDeserializerOptions>;
18
- protected newInstanceOf(id: string, obj: any, options: any): any;
19
- protected createMapper(model: Type<any>, id: string, groups: false | string[]): string;
20
- protected alterValue(schemaId: string, value: any, options: JsonDeserializerOptions): any;
21
- private mapDiscriminator;
22
- private mapProperty;
23
- private getPropertyFiller;
24
- private mapOptions;
25
- private mapAdditionalProperties;
26
- private mapObject;
27
- private mapSet;
28
- private mapArray;
29
- private mapMap;
30
- private mapItem;
31
- private alterBeforeDeserialize;
32
- private alterAfterDeserialize;
33
- }
@@ -1,28 +0,0 @@
1
- import { MetadataTypes, Type } from "@tsed/core";
2
- import { JsonEntityStore } from "@tsed/schema";
3
- import { JsonMapperMethods } from "../interfaces/JsonMapperMethods.js";
4
- import { JsonMapperGlobalOptions } from "./JsonMapperGlobalOptions.js";
5
- export interface JsonDeserializerOptions<T = any, C = any> extends MetadataTypes<T, C>, JsonMapperGlobalOptions {
6
- /**
7
- * Types used to map complex types (Symbol, Array, Set, Map)
8
- */
9
- types?: Map<Type | Symbol | string, JsonMapperMethods>;
10
- /**
11
- * useAlias mapping
12
- */
13
- useAlias?: boolean;
14
- /**
15
- * Use the store which have all metadata to deserialize correctly the model. This
16
- * property is useful when you deal with metadata parameters.
17
- */
18
- store?: JsonEntityStore;
19
- /**
20
- *
21
- */
22
- groups?: string[] | false;
23
- /**
24
- * Add types to deserialize a module using generics feature.
25
- */
26
- generics?: Type[][];
27
- [key: string]: any;
28
- }
@@ -1,60 +0,0 @@
1
- import { Type } from "@tsed/core";
2
- import { JsonSchema } from "@tsed/schema";
3
- export type JsonMapperCallback<Options> = (input: any, options?: Options) => any;
4
- export type CachedJsonMapper<Options> = {
5
- id: string;
6
- fn: JsonMapperCallback<Options>;
7
- };
8
- export type CachedGroupsJsonMapper<Options> = Map<string, CachedJsonMapper<Options>>;
9
- export declare abstract class JsonMapperCompiler<Options extends Record<string, any> = any> {
10
- /**
11
- * Cached mappers metadata
12
- * @protected
13
- */
14
- protected cache: Map<string | Type<any>, CachedGroupsJsonMapper<Options>>;
15
- /**
16
- * Cached executable mappers by his id
17
- * @protected
18
- */
19
- protected mappers: Record<string, JsonMapperCallback<Options>>;
20
- /**
21
- * Cached schemas
22
- * @protected
23
- */
24
- protected schemes: Record<string, any>;
25
- /**
26
- * Cached classes by his id
27
- * @protected
28
- */
29
- protected constructors: Record<string, Type<any>>;
30
- /**
31
- * Global variables available in the mapper
32
- * @protected
33
- */
34
- protected globals: Record<string, any>;
35
- constructor();
36
- addTypeMapper(model: Type<any> | string, fn: any): this;
37
- removeTypeMapper(model: Type<any> | string): void;
38
- addGlobal(key: string, value: any): this;
39
- eval(mapper: string, { id, groupsId, model }: {
40
- id: string;
41
- model: Type<any> | string;
42
- groupsId: string;
43
- }): CachedJsonMapper<Options>;
44
- createContext(options: Options): Options & {
45
- cache: Map<string | Type<any>, CachedGroupsJsonMapper<Options>>;
46
- };
47
- compile(model: Type<any> | string, groups: false | string[], opts?: {
48
- mapper?: any;
49
- }): CachedJsonMapper<Options>;
50
- protected execMapper(id: string, value: any, options: Options): any;
51
- protected abstract map(input: any, options: Options): any;
52
- protected abstract alterValue(schemaId: string, value: any, options: Options): any;
53
- protected abstract createMapper(model: Type<any>, id: string, groups: false | string[]): string;
54
- protected getType(model: Type<any>): Type<any> | MapConstructor | ObjectConstructor | ArrayConstructor | SetConstructor;
55
- protected alterIgnore(id: string, options: Options): any;
56
- protected alterGroups(schema: JsonSchema, groups: false | string[]): boolean;
57
- protected getGroupsId(groups: false | string[]): string;
58
- protected getId(model: Type<any> | string, groupsId: string): string;
59
- protected getSchemaId(id: string, propertyKey: string): string;
60
- }
@@ -1,14 +0,0 @@
1
- export interface JsonMapperGlobalOptions {
2
- /**
3
- * JsonMapper additional property policy. (see [JsonMapper](/docs/json-mapper.md))
4
- */
5
- additionalProperties?: boolean;
6
- /**
7
- * Disable the unsecure constructor injection when the deserialize function is used (by default: false)
8
- */
9
- disableUnsecureConstructor?: boolean;
10
- /**
11
- * Enable strict Groups configuration when the `options.groups` is undefined. (by default: false)
12
- */
13
- strictGroups?: boolean;
14
- }
@@ -1,2 +0,0 @@
1
- import type { JsonMapperGlobalOptions } from "./JsonMapperGlobalOptions.js";
2
- export declare const JsonMapperSettings: JsonMapperGlobalOptions;
@@ -1,10 +0,0 @@
1
- import { Type } from "@tsed/core";
2
- import { JsonMapperMethods } from "../interfaces/JsonMapperMethods.js";
3
- /**
4
- * @ignore
5
- */
6
- export declare function registerJsonTypeMapper(type: Type<any> | Symbol | string, token: Type<JsonMapperMethods>): void;
7
- /**
8
- * @ignore
9
- */
10
- export declare function getJsonMapperTypes(): Map<Type<any> | Symbol | string, JsonMapperMethods>;
@@ -1,22 +0,0 @@
1
- import { Type } from "@tsed/core";
2
- import { JsonMapperCompiler } from "./JsonMapperCompiler.js";
3
- import { JsonSerializerOptions } from "./JsonSerializerOptions.js";
4
- export declare class JsonSerializer extends JsonMapperCompiler<JsonSerializerOptions> {
5
- constructor();
6
- map(input: any, options?: JsonSerializerOptions): any;
7
- protected alterValue(schemaId: string, value: any, options: JsonSerializerOptions): any;
8
- protected createMapper(model: Type<any>, id: string, groups: false | string[]): string;
9
- private mapOptions;
10
- private mapProperty;
11
- private getPropertyFiller;
12
- private createDiscriminatorMapper;
13
- private mapPrecondition;
14
- private mapDiscriminatorKeyValue;
15
- private mapAdditionalProperties;
16
- private mapObject;
17
- private mapSet;
18
- private mapArray;
19
- private mapMap;
20
- private mapItem;
21
- private mapJSON;
22
- }
@@ -1,14 +0,0 @@
1
- import { MetadataTypes, Type } from "@tsed/core";
2
- import { JsonMapperMethods } from "../interfaces/JsonMapperMethods.js";
3
- import { JsonMapperGlobalOptions } from "./JsonMapperGlobalOptions.js";
4
- export interface JsonSerializerOptions<T = any, C = any> extends MetadataTypes<T, C>, Pick<JsonMapperGlobalOptions, "strictGroups"> {
5
- /**
6
- * Types used to map complex types (Symbol, Number, String, etc...)
7
- */
8
- types?: Map<Type<any> | Symbol | string, JsonMapperMethods>;
9
- /**
10
- * useAlias mapping
11
- */
12
- useAlias?: boolean;
13
- [key: string]: any;
14
- }
@@ -1,43 +0,0 @@
1
- export declare class Writer {
2
- static object: {
3
- assign(...args: string[]): string;
4
- };
5
- protected _root?: Writer;
6
- protected body: (string | Writer)[];
7
- private _indent;
8
- constructor(root?: Writer);
9
- static indent(lines: string[]): string[];
10
- static mapper(mapperId: string, key: string, options: string): string;
11
- static mapperFrom(key: string, options: string): string;
12
- static options(...args: string[]): string;
13
- add(...lines: (undefined | string | Writer)[]): this;
14
- arrow(...args: string[]): Writer;
15
- build(): string[];
16
- callMapper(id: string, key: string, ...options: string[]): this;
17
- returnCallMapper(id: string, key: string, ...options: string[]): Writer;
18
- const(name: string, line: string): this;
19
- each(iterable: string, args?: string[]): Writer;
20
- if(condition: string): IfWriter;
21
- switch(input: string): SwitchWriter;
22
- indent(indent: boolean): this;
23
- new(indent?: boolean): Writer;
24
- return(line: string): Writer;
25
- root(): Writer;
26
- set(left: string, right: string): this;
27
- toString(): string;
28
- }
29
- declare class IfWriter extends Writer {
30
- protected condition: string;
31
- protected elseWriter?: Writer;
32
- constructor(condition: string, root: Writer);
33
- else(): Writer;
34
- build(): string[];
35
- }
36
- declare class SwitchWriter extends Writer {
37
- #private;
38
- private input;
39
- constructor(input: string);
40
- case(condition: string): Writer;
41
- build(): string[];
42
- }
43
- export {};
@@ -1,4 +0,0 @@
1
- import { Hooks } from "@tsed/core";
2
- export declare function alterAfterDeserialize(data: any, schema: {
3
- $hooks: Hooks;
4
- }, options: any): any;
@@ -1,4 +0,0 @@
1
- import { Hooks } from "@tsed/core";
2
- export declare function alterBeforeDeserialize(data: any, schema: {
3
- $hooks: Hooks;
4
- }, options: any): any;
@@ -1,2 +0,0 @@
1
- import { JsonHookContext, JsonSchema } from "@tsed/schema";
2
- export declare function alterOnDeserialize(schema: JsonSchema, value: any, options: JsonHookContext): any;
@@ -1,2 +0,0 @@
1
- import { JsonHookContext, JsonSchema } from "@tsed/schema";
2
- export declare function alterOnSerialize(schema: JsonSchema, value: any, options: JsonHookContext): any;
@@ -1,28 +0,0 @@
1
- /**
2
- * @file Automatically generated by @tsed/barrels.
3
- */
4
- export * from "./components/DateMapper.js";
5
- export * from "./components/PrimitiveMapper.js";
6
- export * from "./components/SymbolMapper.js";
7
- export * from "./decorators/afterDeserialize.js";
8
- export * from "./decorators/beforeDeserialize.js";
9
- export * from "./decorators/jsonMapper.js";
10
- export * from "./decorators/onDeserialize.js";
11
- export * from "./decorators/onSerialize.js";
12
- export * from "./domain/JsonDeserializer.js";
13
- export * from "./domain/JsonDeserializerOptions.js";
14
- export * from "./domain/JsonMapperCompiler.js";
15
- export * from "./domain/JsonMapperGlobalOptions.js";
16
- export * from "./domain/JsonMapperSettings.js";
17
- export * from "./domain/JsonMapperTypesContainer.js";
18
- export * from "./domain/JsonSerializer.js";
19
- export * from "./domain/JsonSerializerOptions.js";
20
- export * from "./domain/Writer.js";
21
- export * from "./hooks/alterAfterDeserialize.js";
22
- export * from "./hooks/alterBeforeDeserialize.js";
23
- export * from "./hooks/alterOnDeserialize.js";
24
- export * from "./hooks/alterOnSerialize.js";
25
- export * from "./interfaces/JsonMapperMethods.js";
26
- export * from "./utils/deserialize.js";
27
- export * from "./utils/getObjectProperties.js";
28
- export * from "./utils/serialize.js";
@@ -1,28 +0,0 @@
1
- import { Type } from "@tsed/core";
2
- export interface JsonMapperCtx<T = any, C = any> {
3
- collectionType: Type<C> | undefined;
4
- type: Type<T> | T;
5
- next: JsonMapperNext;
6
- options: {
7
- format?: string;
8
- };
9
- }
10
- export interface JsonMapperNext {
11
- (obj: any): any;
12
- }
13
- export interface JsonMapperMethods {
14
- /**
15
- *
16
- * @param obj
17
- * @param {JsonMapperNext} ctx
18
- * @returns {any}
19
- */
20
- deserialize<T = any, C = any>(obj: any, ctx: JsonMapperCtx<T, C>): any;
21
- /**
22
- *
23
- * @param obj
24
- * @param ctx
25
- * @returns {any}
26
- */
27
- serialize(obj: any, ctx: JsonMapperCtx<any>): any;
28
- }
@@ -1,5 +0,0 @@
1
- import "../components/DateMapper";
2
- import "../components/PrimitiveMapper";
3
- import "../components/SymbolMapper";
4
- import { JsonDeserializerOptions } from "../domain/JsonDeserializerOptions.js";
5
- export declare function deserialize<Model = any>(input: any, options?: JsonDeserializerOptions): Model;
@@ -1 +0,0 @@
1
- export declare function getObjectProperties(obj: any): [string, any][];
@@ -1,5 +0,0 @@
1
- import "../components/DateMapper";
2
- import "../components/PrimitiveMapper";
3
- import "../components/SymbolMapper";
4
- import { JsonSerializerOptions } from "../domain/JsonSerializerOptions.js";
5
- export declare function serialize(input: any, options?: JsonSerializerOptions): any;
File without changes