Using JSON with Claris FileMaker

Using JSON with Claris FileMaker

If you have done any development work in Claris FileMaker or worked with APIs, you may have heard references to JSON but not been aware of how to use JSON with Claris FileMaker. 

JSON (JavaScript Object Notation) has become a fundamental technology for data exchange and integration, especially for developers working with API integrations, AI applications, JavaScript add-ons, and modern web technologies. Essentially, it is a format of JavaScript but is NOT limited to JavaScript. It is plain text formatted with characters and symbols that identify and describe that text. 

An understanding of how to create and parse JSON formatted text is necessary in order to work with just about any API including the FileMaker Data API. By the way, if you don’t know what an API is, you can learn all the basics about APIs here.  

Our free course, JSONFundamentals for Claris FileMaker, teaches FileMaker developers how to work with JSON. And this blog will give you a basic understanding of what JSON is and how it is used with your FileMaker solution. 

youtube-video-thumbnail

What is JSON?

Douglas Crawford created the JSON format in the early 2000s, and he and fellow developer Chip Morningstar sent the first JSON message in April 2001. Its birth grew from a need for a real-time server-to-browser communication protocol.

In the last 20 years, its evolvement has exploded, and today it is respected by FileMaker developers for its many advantages:

  1. It is Human readable. From reading from top to bottom or inside out, you can see the data, and the data will be described. 
  2. It is machine readable. JSON structures its data in ways that are easy for programs to interpret, or 'parse', the documents and extract meaningful information
  3. It is flexible, with multiple tables in a single file. Information can be stored as simple values such as text or numbers, complex objects with their own fields and sub-objects, arrays of values, and more.
youtube-video-thumbnail

What are the advantages of using JSON?

Using JSON with FileMaker, you can represent the entire database system  – records and fields in a single file, which gives you advantages. For example, if you were working with the Quickbooks API, you could send both the invoice and line items simultaneously in the same file (JSON document) whereas you would think to send them as two separate imports.

Another positive with JSON is the way it handles data compared to Excel (or CSV files). In Excel, you are inclined to fill in data yourself after exporting information, but with JSON, the data is beautifully formatted with indents, almost like a “tree” where labels are continuously displayed throughout the data – “self-describing data.” The JSON text has more symbols, but the text is less clunky and more continuous as the data is beautifully formatted so that everything is easy to see.

Example of JSON with Claris FileMaker

The order of the data doesn’t matter to the receiving computer as what matters is the label. Because of the way it is formatted when you put it in an advanced text-editing program like Sublime Text or Notepad++, it allows you to have a variety of neat formatting options. You can collapse or expand the data using left and right arrows and even hide the first set of records if you want. 

How do you use JSON with FileMaker?

Working with JSON requires a developer's touch, but thankfully, understanding JSON is not too difficult. We have worked with it enough that we've come up with a series of lessons showcasing the benefits of JSON as well as how to design and implement it in various FileMaker-based use cases.

The JSONFundamentals for Claris FileMaker course offers details on using JSON, including how it’s formatted, why it’s important, how it’s used today, and what makes it different from other formats such as comma-separated text.  

The lessons in the course include: 

  • Creating JSON objects and arrays.
  • Parsing, reading, and interpreting JSON.
  • Learning how to use AI to construct sample JSON test data.
  • Generating JSON data using various script steps and methods.
  • Reviewing real-world examples and exercises.

Using JSON is kind of like opening “Pandora’s Box.” You will want to be sure you make the right choices in regard to your formatting and structure. You may find that there are numerous methods and strategies on how to parse the JSON using the available script steps and built-in JSON functions in FileMaker. To lessen the confusion, we discuss many of these options and what we consider to be best practices in our course. 

Whether you are a beginner or an experienced developer looking to deepen your understanding, this course will equip you with the foundational JSON skills. You'll learn to effectively create, parse, and use JSON within your FileMaker systems and beyond.

Discover the essentials of JSON! Enroll now and get access to more than 3 hours of content, over 25 lessons, and multiple downloadable demo files.

Once you have learned JSON, we recommend that you explore the API Fundamentals for FileMaker course which will help you learn the world of APIs starting from scratch: how they work, common use cases, how to set up the connection, how to prepare API calls, and how to parse responses.

Updated August 20, 2024

Other products and services Productive Computing, Inc. offers: