Updated json serialization with cancellable method.