json-casing
v1.2.10
Published
A simple library to convert JSON objects from one case (ie Camel) to another (ie Pascal).
Downloads
11,356
Readme
json-casing
Here are a few lines of code taken from a unit test so you can see how to use this very simple JavaScript.
import { JSONCasing } from 'json-casing';
var camelObj = { prop1: "prop 1", obj1: { deepProp1: "dp1", deepProp2: "dp2" } };
var pascalObj = { Prop1: "prop 1", Obj1: { DeepProp1: "dp1", DeepProp2: "dp2" } };
var result = JSONCasing.toCamel(pascalObj);
expect(JSON.stringify(result)).toBe(JSON.stringify(camelObj));