Load a JSON string into a data structure.
Also, create a new data structure and serialize it into JSON.

Use objects and arrays (as appropriate for your language)
and make sure your JSON is valid (https://jsonformatter.org).

class TestClass{
    String foo {get;set;}
    Integer bar {get;set;}
}
 
TestClass testObj = new TestClass();
testObj.foo = 'ABC';
testObj.bar = 123;
 
String serializedString = JSON.serialize(testObj);
TestClass deserializedObject = (TestClass)JSON.deserialize(serializedString, TestClass.class);
 
//"testObj.foo == deserializedObject.foo" is true
//"testObj.bar == deserializedObject.bar" is true
 