I don't think you need to use an object just for JSON, since associative arrays are translated to JSON objects too.