Personally, this was the highlight of my workday. This is what the JSON diff tool produced: In other words, what was the existing configuration and what was the new desired configuration? I knew that once I could see the difference, I would be able to systematically test each of the changes in value and uncover the one that caused the error. Technically speaking, that involved looking at the current configuration (in JSON format) of the Ad Set in question via the Facebook Marketing API and then contrasting it against the request that our backend tried to make for updating its value. In today’s debugging, I wanted to find out what was the change that one of our users tried to make to her Ad Set through our tool that resulted in the dreaded “Unknown Error” returned from Facebook’s server. As a developer, looking for such a tool should have come more naturally! Thinking in retrospect now, I feel so silly. I mostly just eyeballed the two files in Visual Studios Code and looked for differences. With API requests naturally comes a lot of JSON objects, since basically every data transfer protocol now happens with JSON over the internet.īefore today, I admit, I haven’t thought to diff two JSON files using an external tool. Because the Smartly.io tool is a platform for automating advertising across Facebook and Pinterest (with more channels to come), we do a lot of API requests to other servers from our backend. My use caseĪt Smartly.io where I work, we sometimes have to help our customers debug a problem with our tool. Paste two JSON files into the tool and it shows you the differences between them. A tool to find differences between JSON files published: Ī very cool tool that I discovered today from google searching is JSON Diff.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |