Using json_encode instead of rolling my own.  Thanks MatmaRex.