Interface JsonNormaliser


  • @Role
    @Unstable
    public interface JsonNormaliser
    Provides APIs for normalizing data received from Matomo, for easing the afterwards manipulations. Depending on what was requested from Matomo, the response can have various formats, which are not consistent or need enhancement.
    Since:
    1.0
    Version:
    $Id$
    • Method Detail

      • normaliseData

        com.fasterxml.jackson.databind.JsonNode normaliseData​(String jsonString,
                                                              Map<String,​String> filters)
                                                       throws com.fasterxml.jackson.core.JsonProcessingException
        Normalise the data returned to have the expected format.
        Parameters:
        filters - holds the criteria for filtering a dataset
        jsonString - a string that has the expected format
        Returns:
        a JsonNode with the root of the normalized JSON
        Throws:
        com.fasterxml.jackson.core.JsonProcessingException - Throws this error when the jsonString param is not a proper json
      • getIdentifier

        String getIdentifier()
        Retrieve the hint of a component.
        Returns:
        hint of the component