Answer the question
In order to leave comments, you need to log in
Parsing JSON format ISPManager API?
It's inconvenient to use XML. By default, there is an output in JSON.
The problem is that JSON comes prefixed with $
.
In this connection, the further use of these keys on the puff is not possible.
How can you use these variables or how to change the prefix in the settings of the panel itself. I didn't find anything in the documentation.
stdClass Object
(
[$id] => 51b9a6c4a98d
[$level] => 16
[$] => 51b9a6c4a98d
)
(stdClass Object)->{"\$id"}
... but this is nonsense.
Answer the question
In order to leave comments, you need to log in
Through the support partly solved the problem. It turns out there is an undocumented old_json that outputs usable arrays. However, everything is already done through SimpleXML.
forum.ispsystem.ru/archive/index.php/t-26120.html
parse into an array
Or replace in JSON $ with emptiness str_replace
Maybe just walk through the line with json before using it, and cut / replace with the $ regex in the key names?
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question