Feature Request: native JSON parsing function

Because everyone having to include huge swathes of unsupported third-party RouterOS functions to do such a common task is not a good look :slight_smile:

I’m probably not the only one that would really appreciate first-class support for parsing JSON objects in RouterOS scripts.

Thanks, guys!

Mikrotik added :serialize and :deserialize commands in v7 which support JSON. I’ve not tested to see if it handles nested arrays.

Yes, it does. Look for @Amm0’s detailed explanations and examples on the matter.

Brilliant! Thanks. Not sure why I didn’t spot this in the docs earlier.

I have an example of using :serialize/:deserialize with /tool/fetch for the pushover app’s JSON API here:
http://forum.mikrotik.com/t/pushover-ready-mikrotik-script-to-send-messages/120920/1
The approach work for most JSON API with a change of the URL used inside the function and different array of data provided.