« Playing with Machine … | Home | MBS FileMaker Plugin,… »

Embrace JSON

With the next MBS FileMaker Plugin release, we will embrace JSON functions for our FileMaker plugin. As more developers now learn JSON, we can now return you more data as JSON. Instead of making dozens of calls to query all information about a field in a PDF document, you may just want to call DynaPDF.GetFieldsAsJSON and get details for all fields in one chunk and then pick what you need. On the way we made similar functions for annotations, bookmarks, color spaces, doc information, embedded files, fields, fonts and system font information:

As the new function barcode function for DynaPDF came along, we pass there all parameters via JSON. Check DynaPDF.InsertBarcode function to insert a barcode in the current open page. We provide the DynaPDF.GetDefaultBarcodeParameters function to get default parameters, where you can just take that JSON and then make changes, before inserting it.

For listing files, we add a Files.ListAsJSON function to return not just the file names, but more information as an array of JSON objects. You can have file name, size, directory and visible flags included. If requested, we also include in creation, modification and access time stamps. By using JSON, we can later add more entries as needed.

When you use LDAP functions, you can get result as JSON block with LDAP.JSON function. You can add or modify records with LDAP.AddJSON or LDAP.ModifyJSON functions.

Our Archive functions can return JSON for file listing with Archive.FileList and full details with Archive.Content function.

For SQL functions, you can also use JSON to query what's currently in the record, in parameters or all records. You can also set parameters via JSON, e.g. to batch create records with an INSERT statement.

Finally for CURL you can use CURL.GetHeaderAsJSON function to query the headers of a HTTP Request as JSON object. As always, this allows us to pass you multiple items in one plugin call and then allow you to process the entries.

Let us know if you have questions or additional function ideas.

29 09 20 - 10:53