From fccd641f02fc0db463d34e1a7cc459ad6bd0b265 Mon Sep 17 00:00:00 2001 From: DivisionByZero Date: Sat, 18 Feb 2023 16:05:22 +0100 Subject: refactor(datatype): deprecate `json` (#1852) --- src/modules/datatype/index.ts | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'src/modules') diff --git a/src/modules/datatype/index.ts b/src/modules/datatype/index.ts index 7410e149..bf07cfd5 100644 --- a/src/modules/datatype/index.ts +++ b/src/modules/datatype/index.ts @@ -383,8 +383,17 @@ export class DatatypeModule { * faker.datatype.json() // `{"foo":"mxz.v8ISij","bar":29154,"bike":8658,"a":"GxTlw$nuC:","b":40693,"name":"%'77"}` * * @since 5.5.0 + * + * @deprecated Build your own function to generate complex objects. */ json(): string { + deprecated({ + deprecated: 'faker.datatype.json()', + proposed: 'your own function to generate complex objects', + since: '8.0', + until: '9.0', + }); + const properties = ['foo', 'bar', 'bike', 'a', 'b', 'name', 'prop']; const returnObject: Record = {}; -- cgit v1.2.3