added json serialization to result classes