Some messages differ in format according to core version.
Keep the internal attibute format the same regardless of core version, but handle the parse from json, and the export to json, differently, depending on the core version.
The core version is available in the site/supervisor proxy when you receive or send a message, which i typically when you deal with json.
In cases you want to work with json in other situations, e.g for testing, the core version can be supplied manually.