none
Logic App -> HTTP GET -> PARSE JSON = "ValidationFailed" RRS feed

  • Question

  • In my Logic Apps, the first step is it runs a 'HTTP GET'.  I'm assuming the results from that are JSON.  So my second step is 'PARSE JSON'.  When I run it I'm getting 'ValidationFailed. The schema validation failed.'.  I ran the same get statement in Postman and pasted the JSON results to build the schema for the 'PARSE JSON'.  

    Here's my error from the 'PARSE JSON':

    [
    {
    "message": "Invalid type. Expected String but got Null.",
    "lineNumber": 0,
    "linePosition": 0,
    "path": "data[10].account_code_id",
    "schemaId": "#/properties/data/items/properties/account_code_id",
    "errorType": "type",
    "childErrors": []

    }

    Here's my schema from the 'PARSE JSON':

    {
    "properties": {
    "data": {
    "items": {
    "properties": {
    "account_code_id": {
    "type": "string"
    },
    "allow_new_reservations": {
    "type": "string"
    },
    "ask_questions": {
    "type": "string"
    },
    "auto_print_labels": {
    "type": "string"
    },
    "auto_print_run_card": {
    "type": "string"
    },
    "board_together": {
    "type": "string"
    },
    "capacity_by_lodging": {
    "type": "string"
    },
    "charge_by_24_hours": {
    "type": "string"
    },
    "charge_by_hour": {
    "type": "string"
    },
    "charge_by_midnights_crossed": {
    "type": "string"
    },
    "color": {
    "type": "string"
    },
    "compound_pricing_rules": {
    "type": "string"
    },
    "convert_after_minutes": {},
    "convert_at": {},
    "convert_to": {},
    "customer_cancel_before_minutes": {},
    "description": {},
    "dropoff_times": {},
    "email_custom_text": {},
    "email_minutes_before_start": {},
    "email_survey_every_number_reservations": {},
    "email_survey_minutes_after_checkout": {},
    "id": {
    "type": "string"
    },
    "increment_by": {},
    "interval": {
    "type": "string"
    },
    "is_deleted": {
    "type": "string"
    },
    "is_taxed": {
    "type": "string"
    },
    "late_checkout_fee": {},
    "late_checkout_time": {},
    "name": {
    "type": "string"
    },
    "number_days_max_start": {},
    "only_appointment": {
    "type": "string"
    },
    "question_1": {},
    "question_2": {},
    "question_3": {},
    "quick_add": {
    "type": "string"
    },
    "require_reservation_of_type": {},
    "show_availability_calendar_customers": {
    "type": "string"
    },
    "show_availability_calendar_employees": {
    "type": "string"
    },
    "show_customer_rates": {
    "type": "string"
    },
    "show_on_feeding_report": {
    "type": "string"
    },
    "show_on_medication_report": {
    "type": "string"
    },
    "single_day": {
    "type": "string"
    },
    "sms_minutes_before_start": {},
    "status": {
    "type": "string"
    },
    "type": {
    "type": "string"
    }
    },
    "required": [
    "id",
    "type",
    "description",
    "quick_add",
    "only_appointment",
    "late_checkout_time",
    "late_checkout_fee",
    "color",
    "ask_questions",
    "auto_print_labels",
    "auto_print_run_card",
    "question_1",
    "question_2",
    "question_3",
    "board_together",
    "charge_by_hour",
    "charge_by_24_hours",
    "charge_by_midnights_crossed",
    "increment_by",
    "status",
    "allow_new_reservations",
    "is_taxed",
    "convert_to",
    "convert_at",
    "convert_after_minutes",
    "email_minutes_before_start",
    "sms_minutes_before_start",
    "email_survey_minutes_after_checkout",
    "email_survey_every_number_reservations",
    "compound_pricing_rules",
    "show_customer_rates",
    "customer_cancel_before_minutes",
    "number_days_max_start",
    "is_deleted",
    "interval",
    "email_custom_text",
    "single_day",
    "dropoff_times",
    "show_on_feeding_report",
    "show_on_medication_report",
    "require_reservation_of_type",
    "capacity_by_lodging",
    "show_availability_calendar_employees",
    "show_availability_calendar_customers",
    "account_code_id",
    "name"
    ],
    "type": "object"
    },
    "type": "array"
    },
    "error": {
    "type": "boolean"
    }
    },
    "type": "object"
    }


    Tuesday, September 17, 2019 5:51 PM

Answers

All replies

  • Lokks like the schema is not correct. Please try generating schema using this tool. replace the newly generated schema from the tool in your LA Parse Json action.

    P.S. if you have a literal string that starts with the @ character in your schema, prefix the @ character with another @ character as an escape character: @@. something as below:

    {
    
    "@@type":"xyz"
    
    }


    Wednesday, September 18, 2019 4:38 AM
    Moderator
  • That was it.  I tried a different online tool to check the format, but I must have been doing something wrong.

    Thanks!

    Wednesday, September 18, 2019 8:40 AM
  • Hello ETL Developer 17,

    Thank you for the response. Just wanted to check if the above answer helped resolving your issue please mark it as answer so that it will help other in the community.

    Wednesday, September 18, 2019 11:09 AM
    Moderator