Add jsonSerialize() method to stub file