JSON(P) generation function for PHP