web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Invalid type. Expected...
Power Automate
Unanswered

Invalid type. Expected String but got Null

(0) ShareShare
ReportReport
Posted on by 81
Hi,
 
I'm getting following error when I "Parse JSON".
 
{
    "errors": [
        {
            "message""Invalid type. Expected String but got Null.",
            "lineNumber"0,
            "linePosition"0,
            "path""[15]['\"Betalarens kontonr.\"']",
            "schemaId""#/items/properties/\"Betalarens kontonr.\"",
            "errorType""type",
            "childErrors": []
        },
 
Zoran_0-1629894818914.png

 

Here is my schema
{
    "type""array",
    "items": {
        "type""object",
        "properties": {
            "\"Leveransref.: \"": {
                "type""string"
            },
            "\"Leveransdatum: \"": {
                "type""string"
            },
            "\"Buntbelopp: \"": {
                "type""string"
            },
            "\"Mottagarens kontonr: \"": {
                "type""string"
            },
            "\"Summa ej avstämt\"": {
                "type""string"
            },
            "\"Valuta\"": {
                "type""string"
            },
            "\"Datum. \"": {
                "type""string"
            },
            "\"Klient: \"": {
                "type""string"
            },
            "\"Filnamn: \"": {
                "type""string"
            },
            "\"Referens\"": {
                "type""string"
            },
            "\"Betalarens kontonr.\"": {
                "type""string"
            },
            "\"Summa frÃ¥n betalare\"": {
                "type""string"
            },
            "\"Fritext1\"": {
                "type""string"
            },
            "\"Fritext2\"": {
                "type""string"
            },
            "\"Total IN transaktionsl�pnummer\"": {
                "type""string"
            },
            "\"Mottagande bankgironummer\"": {
                "type""string"
            },
            "\"Organisationsnummer\"": {
                "type""string"
            },
            "": {}
        },
        "required": [
            "\"Leveransref.: \"",
            "\"Leveransdatum: \"",
            "\"Buntbelopp: \"",
            "\"Mottagarens kontonr: \"",
            "\"Summa ej avstämt\"",
            "\"Valuta\"",
            "\"Datum. \"",
            "\"Klient: \"",
            "\"Filnamn: \"",
            "\"Referens\"",
            "\"Betalarens kontonr.\"",
            "\"Summa frÃ¥n betalare\"",
            "\"Fritext1\"",
            "\"Fritext2\"",
            "\"Total IN transaktionsl�pnummer\"",
            "\"Mottagande bankgironummer\"",
            "\"Organisationsnummer\"",
            ""
        ]
    }
}
 
I have tried to edit the schema according to below picture, but I have not managed get it right.
Zoran_1-1629895345307.png

 

Please help me edit the attached schema so that it includes "null". 

Thanks!

Categories:
I have the same question (0)
  • Verified answer
    eric-cheng Profile Picture
    5,171 on at

    Hi @Zoran ,

     

    You are on the right track.  You just need to do the same for Betalarens kontonr and any other field which is nullable (can also be empty)

     

    Screenshot_20210825-225045_Chrome.jpg

     

    --------------------------------------------------------------------------
    If I have answered your question, please mark my post as a solution
    If you have found my response helpful, please give it a thumbs up

    Connect on LinkedIn

  • Verified answer
    Pstork1 Profile Picture
    68,707 Most Valuable Professional on at

    The error is referring to the "Betalarens kontonr" field.  So that is the schema that should be edited.  It should be

     "\"Betalarens kontonr.\"": {
     "type": ["string", "null"]
     },
  • Zoran Profile Picture
    81 on at

    I believe that all of my lines will need to be able to handle the "null"

    Zoran_0-1629896549640.png

    Is it OK to add "null" to all even though it may be so that some will be using only the "string"?

  • Zoran Profile Picture
    81 on at

    I followed the instructions, however as you can see below in the picture "string" & "null" text is coloured red and not blue as it should be. What's wrong?  

    Zoran_1-1629896706922.png

     

  • Verified answer
    eric-cheng Profile Picture
    5,171 on at

    Hi @Zoran ,

     

    The error is now indicating another field.  You need to repeat this for ALL fields which are nullable or can be null.  

     

    --------------------------------------------------------------------------
    If I have answered your question, please mark my post as a solution
    If you have found my response helpful, please give it a thumbs up

    Connect on LinkedIn

  • manjularavula Profile Picture
    2 on at
         "ER Number": {}, we have to simply open and close brace, then it will accept string null all type values will accept
  • CaioAlmeida91 Profile Picture
    10 on at

    Nice! Tks

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 522 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 364 Moderator

#3
abm abm Profile Picture

abm abm 243 Most Valuable Professional

Last 30 days Overall leaderboard