Now when the PHP side calls the webservice on the Java side, the map type for Java will not be encapsulated.
There are two known formats:
For Java arrays, we use PHP arrays to correspond.
For java objects, we use stdclass to correspond.
So for the map type of Java, how to encapsulate it on the PHP side. . Worrying people. . Ask God for help.
Help you distinguish:
java.util.List is encapsulated as an array, but the key of this array is an integer of increasing int type. eg: $arr[0] = "aaa";
java.util.Map is encapsulated as an array, but the key of this array is string, key-value pair. eg: $arr["a"] = "aaa";
PHP’s array covers many types of other languages.
You can completely use php array to correspond to java map.