Json - Is it really evil?

Discussion in 'Bukkit Discussion' started by spoony_loony, Mar 12, 2014.

Thread Status:
Not open for further replies.
  1. Offline

    spoony_loony

    I keep searching around the internet for all sorts of different things, and it feels like Json keeps on popping up. With bukkit, I like Yaml as it is easy to read and manipulate. The issue is it isn't very... well... object oriented. To me, configs are difficult to analyze (from a java standpoint) and a glitchy (especially with periods).

    So, finally, Json got a try.

    I decided to use gson (google-json) for my serialization/deserialization. Let's just say... I love it. You can serialize an entire class, no issues. With a little but of work, ItemStacks and Inventories can be serialized/deserialized fast as lightning. It is easy to locate errors, and will explain what went wrong. With Json, who cares if there is inappropriate spacing or the tab key is used? All of that is ignored!

    The issue is that Json is different. I know people here who are used to Yaml are going to see Json as odd and simply confusing. That is just because you need to learn it. I truly believe it is greater than Yaml, and bukkit should simply switch over to using it. Now I know people are going to disagree, and that is OK. The reason I posted this is because want to know why not to use Json.

    So who are you with? Json or Yaml?
     
  2. Offline

    Garris0n

    I don't know anything about JSON, but I passionately hate YAML.
     
    CaptainBern likes this.
  3. Offline

    Gamecube762

    IMO YAML is good for configs, it's easier to edit(user side) and JSON is good for data(Status, values, ext.). Compaired to YAML, JSON is less user friendly when it comes to editing, but I've made use of both in my IsMinecraftDown plugin.
     
  4. Offline

    TheKomputerKing

    spoony_loony

    Also, just to let you know, Bukkit already has gson as a dependency so you don't need to shade it in :)
     
  5. Offline

    Syd

    You know, JSON is a subset of YAML. You can write a config in JSON and Bukkit will read it. However, it will save it as YAML again. ;)
     
    desht likes this.
  6. Offline

    Garris0n

    I disagree. One wrong space or one accidental tab and suddenly the whole thing is broken. It's too finicky.
     
    caelum19 likes this.
  7. Offline

    caelum19

    YAML is the whitespace of configs
     
    spoony_loony and Garris0n like this.
  8. Offline

    Garris0n

    Oh god, why...
     
    spoony_loony likes this.
  9. Offline

    spoony_loony

    Whitespace? Why does that even exist!
     
  10. Offline

    Garris0n

    caelum19 likes this.
  11. Offline

    caelum19

    I'll have you know LOLCODE is a serious, well thought-out language with many inplications.
     
  12. Offline

    spoony_loony


    Ok. Well now I see why my friends call me "crazy" when I say I am programming. spoony = scared
     
Thread Status:
Not open for further replies.

Share This Page