Class EventParser


  • public class EventParser
    extends Object
    • Constructor Detail

      • EventParser

        public EventParser()
    • Method Detail

      • prettyJson

        public String prettyJson​(@NonNull
                                 @NonNull String json)
      • parseValueSave

        public <T> Optional<T> parseValueSave​(@NonNull
                                              @NonNull String json,
                                              @NonNull
                                              @NonNull Class<T> valueType)
      • parseElement

        public static <T> Optional<T> parseElement​(com.google.gson.JsonElement json,
                                                   @NonNull
                                                   @NonNull Class<T> valueType)
      • parseElement

        public static <T> Optional<T> parseElement​(com.google.gson.JsonElement json,
                                                   @NonNull
                                                   @NonNull Type valueType)
      • parseValueSave

        public <T> void parseValueSave​(@NonNull
                                       @NonNull String json,
                                       @NonNull
                                       @NonNull Class<T> valueType,
                                       Consumer<T> consumer)
      • from

        public static <T> T from​(@NonNull
                                 @NonNull String json,
                                 @NonNull
                                 @NonNull Class<T> type)
        Converts the present_proof.presentation into an instance of the provided class type:
        Type Parameters:
        T - The class type
        Parameters:
        json - present_proof.presentation
        type - POJO instance
        Returns:
        Instantiated type with all matching properties set
      • getRevealedAttributes

        public static Set<Map.Entry<String,​com.google.gson.JsonElement>> getRevealedAttributes​(@NonNull
                                                                                                     @NonNull String json)
      • getValuesByRevealedAttributes

        public static Map<String,​Object> getValuesByRevealedAttributes​(@NonNull
                                                                             @NonNull String json)