Closed ianstormtaylor closed 10 years ago
Instead of using sprintf to create the JSON dictionaries, I think we would get simpler code if we used the json_encode method. There's an example of that from our WordPress library here. That way we could just do:
sprintf
json_encode
$properties = array( 'id' => $order->getEntityId(), 'total' => $order->getGrandTotal(), 'tax' => $order->getTaxAmount() ); $string = json_encode($properties)
Do you guys see any problems with that?
Sure, it makes sense. Will do that.
Instead of using
sprintf
to create the JSON dictionaries, I think we would get simpler code if we used thejson_encode
method. There's an example of that from our WordPress library here. That way we could just do:Do you guys see any problems with that?