Skip to content

Unable to generate multiple xml files out of json's. #2

@digvijayah02

Description

@digvijayah02

This utility is great for converting a single json but I am facing issue while trying to convert multiple json's.
I have a file which contains multiple json's. Every line is a json and I need to generate that many xml files.
Can you tell me what change would be required so that it reads a line converts that to a new XML file?

I have tried:-
OutputStream outputStream = new FileOutputStream("Path");
then use - new JsonStreamXMLWriter(reader, new BufferedWriter(new OutputStreamWriter(outputStream))).convert();

But it throws below error:-
Exception in thread "main" javax.json.stream.JsonParsingException: Expected EOF token, but got CURLYOPEN
at org.glassfish.json.JsonParserImpl.hasNext(JsonParserImpl.java:361)

Attached in the input json file.
input.txt
?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions