Jump to content

[Tools] NBT<->JSON/GSON Parser. Recommendations?


Recommended Posts

Posted

Basically I am searching web before I write it myself (which would be probably waste of time in this case).

 

Found few threads/sources with such tool, but skimming code just to know which is best of them would take lot of time, so here I am asking - anyone used something nice in past? Links?

 

Simple API would be nice, or Git with source which I can use.

 

Thanks. :)

1.7.10 is no longer supported by forge, you are on your own.

Posted

I thought that NBT is an object, wich means you can simply parse the whole NBT object. No need for an API's in that case. Otherwise try to obtain the map/List with all the NBTentries. It can be parsed easilly as well. (With easy I mean that there is one method that will write everything to the Json/Gson object!)

Projects:

Discontinued:

- N2ConfigAPI

- Meachanical Crafting Table

 

Latest:

- CollectionUtils

 

Coöperations:

- InGameConfigManager

Posted

I am not asking how to do that (because it's damn easy, but takes about 4 hours to make it WELL (with debugging ofc), which can be spent on other things), I am asking if anyone knows ready-to-use API that would simply generate JSON-String from NBTTagCompound and other way around.

 

Well, I'll probably post working parsers if I won't find anything :D

 

Thanks

1.7.10 is no longer supported by forge, you are on your own.

Posted

Alright, sorry for the inconvienience (sorry the bad English). But with a litle google search I found a lot of easy ways to acomplish this.

 

http://www.mkyong.com/java/how-do-convert-java-object-to-from-json-format-gson-api/

This is an simple example for creating a Json object and read it again. So Im not sure if its that big of a deal to create an whole API for it. Though if you realy want to... go ahead :D.

 

Edit:

I didnt use the right words in the first post, thoug what I meant is that every Entity/Item etc. Has its own instance of the NBT, meaning that you can simple get the instance and parse it. Backwards you may need to itterate through every NBT entry and set it the 'traditional' way.

Projects:

Discontinued:

- N2ConfigAPI

- Meachanical Crafting Table

 

Latest:

- CollectionUtils

 

Coöperations:

- InGameConfigManager

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Announcements



×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.