class JsonCredentialVersion extends CredentialVersion {

  public void setValue(final JsonNode value) {
    if (value == null) {
      throw new ParameterizedValidationException(ErrorMessages.MISSING_VALUE);
    }

    try {
      final String serializedString = objectMapper.writeValueAsString(value);

      super.setValue(serializedString);
    } catch (final JsonProcessingException e) {
      throw new RuntimeException(e);
    }
  }

  public  JsonCredentialVersion(final JsonCredentialVersionData delegate);
  public  JsonCredentialVersion(final String name);
  public  JsonCredentialVersion(final JsonCredentialValue jsonValue, final String name, final Encryptor encryptor);

}