Cloaking is when you show content to a search engine that is different than what you show to a user.
Google tests web pages from outside of it's own network and you will never know. If there is a difference between what you show googlebot and users, Google will spot-check more pages for differences. If enough pages appear to have significant enough differences, the penalty is applied.
It is as simple as that.
To answer your question, it can be cloaking if the content change is significant enough. Never show different content to search engines than to users. Just keep it all simple.
[Update]
Thank you for the example of what you are specifically asking.
Cloaking is what I have defined earlier, however, there is a bit of tolerance especially in light of desktop versus mobile. In the early days, cloaking could simply be determined by capturing the page twice, once via the crawler, and once external to the crawler often from another network, and comparing the checksum for each page. However, these days, it is not so simple with desktop versus mobile.
We know that Google can fetch a series of pages and determine templated content versus page content rather easily. In light of the state of the web these days, I would have to assume that some level of analysis takes place to compare the content portion of the page and possibly the template portion of the page separately. How pages are analyzed for cloaking these days will likely remain a mystery. However, it is reasonable to assume that some minor differences in the non-content portion of the page is to be expected in some cases.
The next question is, Is it wise to present JSON data to crawlers only?
No one can say specifically if a search engine, Google in particular since Bing seems to be rather tolerant, will see the omission of JSON as being deceptive. It has to be recognized as a risk even if it appears to be small and a reasonable thing to do. As a recommendation, I would say to include the JSON data to both users and crawlers to avoid any issues. Why? Because cloaking is not a small violation at least in Google's eyes. If cloaking is detected, Google will spot check the site and then apply the penalty. This is an automated process. Once the penalty is applied, it can take quite a while to remove the penalty and likely is a knock on the sites trust metrics effecting search even after the penalty is lifted.