Go through the 'Getting Started' tutorial and see the form of the JSON-RPC request for publishing an item (this is output on the command line when you run multichain-cli).
Assuming you're using MultiChain 2.0 alpha, you need to replace the hexadecimal data in that example with this structure:
{"json":null}
Replace the null in that with the JSON you want to embed. This function might help you:
http://php.net/manual/en/function.json-encode.php