functions for en-/decoding APEX, DWR, GWT