Custom JSON marshal and unmarshal functions are used to alter the encoded content for certain types. For example, the content of a BIT STRING is JER does not match what would be encoded by default. The JER encoding has a 'length' and 'value' member. A cusomized Marshal and Unmarshal method are therefore generated in the run-time to modify the encoded value to be in the JER format.