validate XML & validate JSON - Mule 4

Поділитися
Вставка
  • Опубліковано 13 вер 2024
  • How to convert JSON file to JSON schema
    www.liquid-tec...
    How to validate xml files against a schema:
    www.freeformat...
    How to validate a json file:
    jsonlint.com/
    Input JSON file:
    {
    "Name" : "Ram",
    "Age" : "25",
    "Profession" : "SE",
    "Address" : {
    "City" : "Hyderabad",
    "State" : "TS"
    }
    }
    JSON Schema:
    {
    "$schema": "json-schema.org...",
    "type": "object",
    "properties": {
    "Name": {
    "type": "string"
    },
    "Age": {
    "type": "string"
    },
    "Profession": {
    "type": "string"
    },
    "Address": {
    "type": "object",
    "properties": {
    "City": {
    "type": "string"
    },
    "State": {
    "type": "string"
    }
    },
    "required": [
    "City",
    "State"
    ]
    }
    },
    "required": [
    "Name",
    "Age",
    "Profession",
    "Address"
    ]
    }
    Please check below link to get XML file and XSD(XML Schema Definition)
    www.w3schools....
    ***************************************************************************************
    Links for other videos:
    Dataweave: • DataWeave
    Flow Control: • Flow Control
    Mule scopes: • Mule Scopes
    Mule Basics & Miscellaneous : • Mule Basics
    Error Handling: • Error Handling
    File Module: • File Module
    Object Store: • Object Store
    Database : • Database Module
    VM Connector: • VM Connector
    Batch Processing: • Batch Processing
    Salesforce & Mulesoft Integration: • Salesforce - Mulesoft ...
    HTTPS (1 way SSL & 2 way SSL): • HTTPS
    Munits (created Manually): • Munits
    Transaction Management: • Transaction Management
    Alerts & Monitoring: • Alerts & Monitoring
    Anypoint MQ: • Anypoint MQ
    Thanks

КОМЕНТАРІ • 1

  • @jacekbiaecki8076
    @jacekbiaecki8076 2 роки тому +3

    Nice video. Maybe it's worth mentioning that both JSON and XML validators generate errors: JSON:SCHEMA_NOT_HONOURED or XML-MODULE:SCHEMA_NOT_HONOURED, respectively. Those errors may be handled and the list of detailed messages retrieved - which in turn may be utilized to provide useful information to the caller (what was wrong with the request).