Posted on March 27, 2012 by Tommy McGuire
Labels: software development, protocols, http, java

I have a confession to make. I participated in something horrible recently. I hope that sometime, somewhere, I can forgive myself.

ASON /eɪ - sahn/, short for ASCII JSON is a serialization encoding for JSON invented by Del Johnson, used to tunnel large JSON requests to an application through an Oracle Web Center Interactive portal gateway without triggering errors from the gateway.

ASON is an "ASCII encoding" of JSON text which simultaneously

Finally, it's a horrible, horrible thing that will leave any decent programmer wanting to take up turkey farming. (I know I do, and turkey farming is pretty nasty.) The only advantage it has is that it seems to allow requests greater than 16k to pass through the OWI portal gateway.

The steps needed to serialize a message using ASON are simple:

  1. Build the JSON text as usual.
  2. Iterate over the characters in the JSON text, building a new string by:
    • Converting each character to its decimal numeric representation, and
    • separating the decimal numbers with commas.

Deserializing the message is the inverse of serialization.

An example ASON message is:


[Edit: Great. I can't even look up ASCII correctly anymore. "H feel..." Bah. Thanks, Del.]

[Edit: Further implementation experience with ASON from Del: the JavaScript to encode ASON on IE7 takes roughly two and a half minutes to encode 20k worth of JSON text. This seems to be due to a poor implementation of string concatenation; a naive implementation faced with multiple concatenations would copy the first string and append the second, copy the first two and append the third, copy the first three.... Concatenating the strings this way is O(n2). An alternative of pushing the interim segments into an array and then joining the array is O(n) and takes negligible time.]




I am familiar with JSON part, as such it is horrible but it's implementations can manage the secure number encodings, and some frameworks, such as PHP's execution of JSON, always do the secure number encodings of everything.


cbass, Del asserts that ASON has an advantage there because the characters are encoded unsigned.

I need a shower.

Tommy McGuire

Terry, I'm not sure what you are referring to.

The problem we had was that WCI ( was blowing chunks on large, JSON-bodied requests going to a back-end application ( Seems like it didn't like all the characters.

Now I really need a shower.

Tommy McGuire
active directory applied formal logic ashurbanipal authentication books c c++ comics conference continuations coq data structure digital humanities Dijkstra eclipse virgo electronics emacs goodreads haskell http java job Knuth ldap link linux lisp math naming nimrod notation OpenAM osgi parsing pony programming language protocols python quote R random REST ruby rust SAML scala scheme shell software development system administration theory tip toy problems unix vmware yeti
Member of The Internet Defense League
Site proudly generated by Hakyll.