JSON requires double quoted field names (keys). For example "dataSource" is encoded well, but transaction, transactionNum and operations don't have quotes. As a result PHP's json_decode() doesn't work. Quoting should be consistent to avoid the need of custom JSON decoder in PHP. 
	
							
						
					Code:
	
	'{ transaction: { transactionNum: 0, operations: [{
    "dataSource":"ds1", 
    "operationType":"fetch", 
    "data":null, 
    "oldValues":null
}, {
    "dataSource":"ds2", 
    "operationType":"fetch", 
    "data":null, 
    "oldValues":null
}]}}'

Comment