url encode/decode api + serialized restructure function