Use json_encode instead of JRegistry

Use native PHP function for increased performance