// Path: src/main/java/com/presidentio/testdatagenerator/model/Schema.java
// public class Schema {
// 
//     private List<Template> templates = new ArrayList<>();
// 
//     private List<String> root = new ArrayList<>();
// 
//     private List<Variable> variables = new ArrayList<>();
// 
//     private Output output;
// 
//     public List<Template> getTemplates() {
//         return templates;
//     }
// 
//     public void setTemplates(List<Template> templates) {
//         this.templates = templates;
//     }
// 
//     public List<String> getRoot() {
//         return root;
//     }
// 
//     public void setRoot(List<String> root) {
//         this.root = root;
//     }
// 
//     public List<Variable> getVariables() {
//         return variables;
//     }
// 
//     public void setVariables(List<Variable> variables) {
//         this.variables = variables;
//     }
// 
//     public Output getOutput() {
//         return output;
//     }
// 
//     public void setOutput(Output output) {
//         this.output = output;
//     }
// }


import com.presidentio.testdatagenerator.model.Schema;
import org.codehaus.jackson.map.ObjectMapper;
import org.codehaus.jackson.map.deser.StdDeserializerProvider;
import org.codehaus.jackson.map.module.SimpleDeserializers;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
/**
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package com.presidentio.testdatagenerator.parser;



public class JsonSchemaSerializer implements SchemaSerializer {

    private ObjectMapper objectMapper;

    public JsonSchemaSerializer() {
        objectMapper = new ObjectMapper();
        SimpleDeserializers simpleDeserializers = new SimpleDeserializers();
        simpleDeserializers.addDeserializer(String.class, new StringDeserializer());
        objectMapper.setDeserializerProvider(
                new StdDeserializerProvider().withAdditionalDeserializers(simpleDeserializers));
    }

    @Override
// Path: src/main/java/com/presidentio/testdatagenerator/model/Schema.java
// public class Schema {
// 
//     private List<Template> templates = new ArrayList<>();
// 
//     private List<String> root = new ArrayList<>();
// 
//     private List<Variable> variables = new ArrayList<>();
// 
//     private Output output;
// 
//     public List<Template> getTemplates() {
//         return templates;
//     }
// 
//     public void setTemplates(List<Template> templates) {
//         this.templates = templates;
//     }
// 
//     public List<String> getRoot() {
//         return root;
//     }
// 
//     public void setRoot(List<String> root) {
//         this.root = root;
//     }
// 
//     public List<Variable> getVariables() {
//         return variables;
//     }
// 
//     public void setVariables(List<Variable> variables) {
//         this.variables = variables;
//     }
// 
//     public Output getOutput() {
//         return output;
//     }
// 
//     public void setOutput(Output output) {
//         this.output = output;
//     }
// }


// Path: src/main/java/com/presidentio/testdatagenerator/parser/JsonSchemaSerializer.java
import com.presidentio.testdatagenerator.model.Schema;
import org.codehaus.jackson.map.ObjectMapper;
import org.codehaus.jackson.map.deser.StdDeserializerProvider;
import org.codehaus.jackson.map.module.SimpleDeserializers;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;

/**
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package com.presidentio.testdatagenerator.parser;



public class JsonSchemaSerializer implements SchemaSerializer {

    private ObjectMapper objectMapper;

    public JsonSchemaSerializer() {
        objectMapper = new ObjectMapper();
        SimpleDeserializers simpleDeserializers = new SimpleDeserializers();
        simpleDeserializers.addDeserializer(String.class, new StringDeserializer());
        objectMapper.setDeserializerProvider(
                new StdDeserializerProvider().withAdditionalDeserializers(simpleDeserializers));
    }

    @Override
    public Schema deserialize(InputStream inputStream) throws IOException {