Serialize FMR programs to JSON