{"action":"created","issue":{"url":"https://api.github.com/repos/grrk-bzzt/kq-fork/issues/32","repository_url":"https://api.github.com/repos/grrk-bzzt/kq-fork","labels_url":"https://api.github.com/repos/grrk-bzzt/kq-fork/issues/32/labels{/name}","comments_url":"https://api.github.com/repos/grrk-bzzt/kq-fork/issues/32/comments","events_url":"https://api.github.com/repos/grrk-bzzt/kq-fork/issues/32/events","html_url":"https://github.com/grrk-bzzt/kq-fork/issues/32","id":124303195,"number":32,"title":"JSON or XML support","user":{"login":"OnlineCop","id":1168697,"avatar_url":"https://avatars.githubusercontent.com/u/1168697?v=3","gravatar_id":"","url":"https://api.github.com/users/OnlineCop","html_url":"https://github.com/OnlineCop","followers_url":"https://api.github.com/users/OnlineCop/followers","following_url":"https://api.github.com/users/OnlineCop/following{/other_user}","gists_url":"https://api.github.com/users/OnlineCop/gists{/gist_id}","starred_url":"https://api.github.com/users/OnlineCop/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/OnlineCop/subscriptions","organizations_url":"https://api.github.com/users/OnlineCop/orgs","repos_url":"https://api.github.com/users/OnlineCop/repos","events_url":"https://api.github.com/users/OnlineCop/events{/privacy}","received_events_url":"https://api.github.com/users/OnlineCop/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":6,"created_at":"2015-12-30T04:42:36Z","updated_at":"2016-02-07T08:59:42Z","closed_at":null,"body":"The proposed Tiled map format uses TMX, which uses an XML-formatted structure. It would be nice if a lot of our hard-coded values could be exported to an easier-to-read and easier-to-change format: XML or JSON. I guess we could also go a stronger LUA route, pushing as much as possible off into lua, although I prefer that data be kept in a more data-friendly format, and leave LUA to processing logic.\r\n\r\nTwo proposed JSON libraries were:\r\n\r\n* https://github.com/udp/json-parser\r\n* https://github.com/akheron/jansson\r\n\r\n@peterhull90 indicated some familiarity with the former, stating that it was simply two files, `json.c` and `json.h`, that need be included. In a few local cases, I've tried to read in a JSON-formatted file using `udp/json-parser` with mixed results. From what I can gather, its strength is in reading JSON, but outputting JSON would require something else.\r\n\r\nOnline sources for C-based JSON libraries lead me to `jansson` although I have no experience with this. If it supports reading/writing and isn't too convoluted to get into place, it may be a good direction to go.\r\n\r\nThe other option is to look into storing data as XML. There is no shortage of C-based XML solutions out there, if we want to go that route instead."},"comment":{"url":"https://api.github.com/repos/grrk-bzzt/kq-fork/issues/comments/180979681","html_url":"https://github.com/grrk-bzzt/kq-fork/issues/32#issuecomment-180979681","issue_url":"https://api.github.com/repos/grrk-bzzt/kq-fork/issues/32","id":180979681,"user":{"login":"peterhull90","id":376711,"avatar_url":"https://avatars.githubusercontent.com/u/376711?v=3","gravatar_id":"","url":"https://api.github.com/users/peterhull90","html_url":"https://github.com/peterhull90","followers_url":"https://api.github.com/users/peterhull90/followers","following_url":"https://api.github.com/users/peterhull90/following{/other_user}","gists_url":"https://api.github.com/users/peterhull90/gists{/gist_id}","starred_url":"https://api.github.com/users/peterhull90/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/peterhull90/subscriptions","organizations_url":"https://api.github.com/users/peterhull90/orgs","repos_url":"https://api.github.com/users/peterhull90/repos","events_url":"https://api.github.com/users/peterhull90/events{/privacy}","received_events_url":"https://api.github.com/users/peterhull90/received_events","type":"User","site_admin":false},"created_at":"2016-02-07T08:59:42Z","updated_at":"2016-02-07T08:59:42Z","body":"I am away this weekend so am typing this into my phone ... I've been using\ntinyxml2 to load the tiled maps and it's pretty good. I know xml is a bit\nunfashionable at the moment but it would be easily possible to do what you\nwant in xml then we don't have two systems to worry about. Worth a thought.\nOn Sat, 6 Feb 2016 at 22:27, OnlineCop <notifications@github.com> wrote:\n\n> Have we decided on a JSON parser? Is Jansson the library of choice? I'm\n> going to rewrite most, if not all, data to be stored in JSON format. We\n> could then get rid of the PACKFILE type, and any expected values that are\n> not defined in the JSON file would just get default values.\n>\n> —\n> Reply to this email directly or view it on GitHub\n> <https://github.com/grrk-bzzt/kq-fork/issues/32#issuecomment-180874682>.\n>\n"}}