Black Ice Media

payload-builder

I wrote this for a project at work where I had to build out JSON payloads for HTTP transmission. It was heavily inspired by the likes of lodash.set, and iterates over a series of paths and setting values of particular types within that path. It allows you to build your payloads in an iterative fashion, and extend it with other capabilities such as checking conditions on a particular value before you actually set it. This was designed to work with a user interface that let developers and admins set up the payload piece by piece.

Last updated