JSON and FileMaker
Integration with rest of the world is increasingly important for FileMaker developers. There are many instances where that integration requires fetching data and bringing it into a FileMaker database. There are many established ways to to make data available for other developers to fetch: XML, JSON, .csv files, etc. Today’s topic is JSON and FileMaker.
JSON (JavaScript Object Notation) uses name/values pairs to identify data:
Example: {“firstName”:”John”, “lastName”:”Doe”}
This is similar toXML, but is JSON is considered easier to use and parse than xml. FileMaker provides a library of commands for working withXML, but does not offer the same for JSON. Thus, when faced with the need to grab JSON formatted data, FileMaker developers have limited options.
Simon, from Beezwax, offers a new way to interact:
There are a number of ways of working with JSON data in FileMaker. At least two typical ones are:
- Custom Functions based parsing & encoding
- using a WebViewer & JavaScript
JSON however doesn’t parse easily with FileMaker’s text handling functions. And using a WebViewer has a number of complications, the main one being the awkwardness of getting data in & out of the WebViewer. Some other solutions only parse JSON, but don’t encode it. So I am going to propose yet another way.
This does have its own dependencies however. The bBox plugin and a small amount of Python scripting will be required. But the combination makes for a very concise implementation.
Simon’s solution seems robust, but is not for the faint of heart. Some understanding of Python and MySQL will come in handy. Still, it provides another tool for the developers tool chest, and a useful one at that.
JSON and FileMaker | the beezwax buzz.