I don\'t work with php much and I\'m a little fuzzy on object creation. I need to make a webservice request sending json and I think I have that part covered. Before I can
You can use json_encode to encode a php array http://php.net/manual/en/function.json-encode.php
$theArray = array('client'= array('build'=>'1.0',
'name'=>'xxxxx',
'version'=>'1.0'
),
'protocolVersion'=> 4,
'data'=> array('distributorId'=>'xxxx',
'distributorPin'=>'xxxx',
'locale'=>'en-US'
)
);
$theObj = json_encode($theArray);
hopefully this helps..
posted it, then seen loads of answers already! :|