Implements a custom JSONEncoder to ejtp-identity