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

Announcements

News and Announcements icon
Community site session details

Community site session details

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

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
    69,026 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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Leaderboard > Power Automate

#1
David_MA Profile Picture

David_MA 251 Super User 2026 Season 1

#2
Haque Profile Picture

Haque 239

#3
Expiscornovus Profile Picture

Expiscornovus 220 Most Valuable Professional

Last 30 days Overall leaderboard