0
How to add a set of values JArray
in an existing json.
void adicionar(string name, string gamedir, string, lastVersionid, string javaArgs)
{
/* adiciona ao json existente... */
}
Existing json code...
{
"profiles": {
"nathan1302": {
"name": "nathan1302",
"lastVersionId": "1.8.8"
},
"Forge": {
"name": "Forge",
"lastVersionId": "1.7.10-Forge10.13.4.1566-1.7.10"
},
"OptiFine": {
"name": "OptiFine",
"lastVersionId": "1.8.8-OptiFine_HD_U_F5",
"launcherVisibilityOnGameClose": "keep the launcher open"
},
"forge": {
"name": "forge",
"gameDir": "C:\\Users\\Nathan Ferreira\\AppData\\Roaming\\.minecraft\\222",
"lastVersionId": "1.7.10-Forge10.13.4.1566-1.7.10",
"javaArgs": "-Xmx5G -XX:+UseConcMarkSweepGC -XX:+CMSIncrementalMode -XX:-UseAdaptiveSizePolicy -Xmn128M",
"launcherVisibilityOnGameClose": "keep the launcher open"
},
"RFMinecraft": {
"name": "RFMinecraft",
"lastVersionId": "1.7.10-LiteLoader1.7.10-1.7.10-Forge10.13.4.1566-1.7.10",
"javaArgs": "-Xmx3G",
"useHopperCrashService": false,
"launcherVisibilityOnGameClose": "keep the launcher open"
} // ADICIONAR DEPOIS DAQUI!
},
"selectedProfile": "forge",
"selectedUser": "fa944578e6f04db3b10ac85e81cf134d",
"launcherVersion": {
"name": "1.6.48",
"format": 17
}
}
How are you loading existing JSON? And you mentioned that you have a "set of values
JArray
", what are these values?– carlosfigueira
So json is existing, this json is in case what would be in the file! I want q after Node
RFMinecraft
he inserts another Jproperty– FRNathan13
Or whatever, the important thing is the original application of it recognize that it is a valid json!
– FRNathan13