decodeProgramJson function
Implementation
Program decodeProgramJson(Object? json) => switch (decodeBallFileJson(json)) {
BallProgramFile(:final program) => program,
BallModuleFile() => throw BallFileFormatException(
'expected a Program ball file but got a Module',
),
};