Proper way to use JSON

Are there any good tutorials on how to use JSON to write large amounts of data to a single file?

Also how would I load that file later and continue to write in the same format?

A good example would be like an item list with data NAME, ID, PRICE

I’m a newbie with this stuff still and a good tutorial would be frikkin sweet.

Since idk what you actually want http://www.w3schools.com/json/ http://beginnersbook.com/2015/04/json-tutorial/

I just wanted a good tutorial for newbies and maybe some advice from rsps developers. I’m looking that the one your gave me right now.


Might help.

GSON is a great library, it can convert generally any object into JSON.

I had it parse the item data from the cfg that PI’s come with into a .json, took literally seconds (minus time writing code).

finally someone using json not those god awful cfg files

https://developers.google.com/protocol-buffers/ much nicer

[quote=“my-swagger, post:6, topic:555688”][quote author=Justin Bieber link=topic=674901.msg4510017#msg4510017 date=1466928763]
finally someone using json not those god awful cfg files
[/quote]
https://developers.google.com/protocol-buffers/ much nicer[/quote]looks cool

[quote=“sk8rdude461, post:4, topic:555688”]http://www.java2blog.com/2013/11/gson-example-read-and-write-json.html
Might help.

GSON is a great library, it can convert generally any object into JSON.

I had it parse the item data from the cfg that PI’s come with into a .json, took literally seconds (minus time writing code).[/quote]

This is awesome dude. I’m basically doing something similar with the items, except I’m using a command to manually output to a file.

[quote=“chazion, post:8, topic:555688”][quote author=sk8rdude461 link=topic=674901.msg4510008#msg4510008 date=1466898724]


Might help.

GSON is a great library, it can convert generally any object into JSON.

I had it parse the item data from the cfg that PI’s come with into a .json, took literally seconds (minus time writing code).
[/quote]

This is awesome dude. I’m basically doing something similar with the items, except I’m using a command to manually output to a file.[/quote]
Yeah you can do that no problem.

It’d probably be easier that way anyways. As after the server starts up all the data that was in the cfg gets parsed into an item list (pretty sure the object is literally “ItemList”).
From there it’s kinda just turning the ItemList array into a string using gson, then writing that string to a file.

You’re pretty late to the party. Pretty sure Ruse doesn’t use any cfg files, same with Vencillio (the two biggest leached servers currently).

oh ok yeah wish i was more up to date on all the new cool servers