MyObjects MyA = (MyObjects) JSON.deserialize(req.requestBody.toString(),MyObjects.class); String code = MyA.Code;