I want to display what I have the properties file as a json array: Here's my java code:
props.setProperty("Info1", "stack1");
props.setProperty("Info2", "stack2");
What I got in properties file:
Info1=stack1
Info2=stack2
Here's what want to get
var Obj = {}
Obj.dataset= [{ "Info1":"stack1" },{ "Info2"="stack2"}];
I tried with Gson and JsonObject but in vain. What should I do please? It's not a duplicate question because I am using properties class and the suggested answers that I have already tried didn't work.