Murat Ozcan
09/02/2024, 1:01 PMMatt (pactflow.io / pact-js / pact-go)
Matt (pactflow.io / pact-js / pact-go)
toJsonMap would be something like this:
const toJsonMap = (obj: any) => JSON.parse(JSON.stringify(obj))Murat Ozcan
09/03/2024, 2:26 PMnull and undefined to a string "null"
• serialize objects (except for dates and arrays) into JSON strings
• convert dates to ISO strings
• preserve numbers, booleans, and arraysMatt (pactflow.io / pact-js / pact-go)
null as "null" is not something I would want represented in my API. Date formats are another good example - some may prefer a timestamp serialisation rather than ISO.