simple PHP object to JSON conversion