Author Topic: [XP][VX][VXA] JSON Encoder/Decoder  (Read 5250 times)

Offline G_G

  • Green Gmod Game_Guy AKA G4 AKA hyper-G AKA G-force
  • Global Moderator
  • Chaos Ultimate
  • ****
  • Posts: 6591
  • LV: 407
  • Gender: Male
    • View Profile
[XP][VX][VXA] JSON Encoder/Decoder
« on: April 17, 2012, 11:32:52 PM »
JSON Encoder/Decoder
Authors: game_guy
Version: 1.1
Type: Script Utility
Key Term: Scripting Tool


JSON (JavaScript Object Notation) is a lightweight data-interchange format. It is easy for humans to read and write. It is easy for machines to parse and generate.
This is a simple JSON Parser or Decoder. It'll take JSON thats been formatted into a string and decode it into the proper object. You can also encode certain Ruby objects into JSON.

This is a scripter's utility and isn't meant to add any new functionality or prove usefulness to non-scripters.

(Released awhile ago on RMRK)


  • Decodes JSON format into ruby strings, arrays, hashes, integers, booleans.
  • Encodes Ruby objects into JSON format.




No demo.


(click to show/hide)


Its recommended to place this script at the top, then it can be used in any script below it. To call the parsing method, use
(click to show/hide)

(click to show/hide)


Should work with anything.

Credits and Thanks

  • game_guy ~ For creating it.

Author's Notes

Enjoy! :) You guys are lucky that VX Ace uses Ruby 1.9, or else this script wouldn't have been released. With the example code I posted, it takes a few seconds for Ruby 1.8 to parse it all.
« Last Edit: December 20, 2012, 08:55:50 PM by Ryex »

Offline Blizzard

  • This sexy
  • Administrator
  • has over 9000 posts
  • *****
  • Posts: 20016
  • LV: 651
  • Gender: Male
  • Magic midgets.
    • View Profile
    • You're already on it. (-_-')
Re: [VXA] JSON Encoder/Decoder
« Reply #1 on: April 18, 2012, 09:14:20 AM »
Remember that you can use multiple tags in the title such as [XP][VX][VXA] to tell the database index to display a link to this script under all 3 RM categories, regardless in which section the script was actually posted. :)
Drago did it as well:
And it works just fine as you can see:

EDIT: You forgot the keyterm. And you forgot it here as well:,11690.0.html
« Last Edit: April 18, 2012, 09:17:51 AM by Blizzard »
Check out Daygames and our games:

King of Booze      King of Booze: Never Ever      Pet Bots
Drinking Game for Android      Never have I ever for Android      Pet Bots for Android
Drinking Game for iOS      Never have I ever for iOS      Pet Bots for iOS
Drinking Game on Steam

Quote from: winkio
I do not speak to bricks, either as individuals or in wall form.

Quote from: Barney Stinson
When I get sad, I stop being sad and be awesome instead. True story.