I wrote a Java program that accepts a JSON object and send to php. However when I receive the JSON in PHP a broken or incomplete array is returned as shown below.
I am sending this JSON object from java and in java I am able to print the JSON object and it shows well:
{"Description":"now locatio-n","ReportedByFirstname":null,"DateReported":null,"Name":"now","FacilityId":"13692","LocationDescription":"now locatio-n","ReportedByPersonId":null,"ReportedByMobileNumber":null,"StatusId":"22","ReportedByLastname":null,"ReportedByEmail":null,"Id":"957394","PriorityId":"2","LocationLat":"","LocationLong":""}
In PHP I print the value as shown below:
print_r($_POST);
and the results are as follows: PLEASE NOTE THE FIRST ELEMENT DESCRIPTION IS NOT FULLY SHOWN.
Array
(
[defect] => -n","ReportedByFirstname":null,"DateReported":null,"Name":"now","FacilityId":"13692","LocationDescription":"now locatio-n","ReportedByPersonId":null,"ReportedByMobileNumber":null,"StatusId":"22","ReportedByLastname":null,"ReportedByEmail":null,"Id":"957394","PriorityId":"2","LocationLat":"","LocationLong":""}
)