[Python] How to use Convert JSON To Dictionary?

Discussão em 'Python' iniciado por Stack, Agosto 16, 2025.

  1. Stack

    Stack Membro Participativo

    How to use Convert JSON To Dictionary?

    1.file json is correctly.

    2.import library correctly.

    The issue is this keyword "Convert JSON To Dictionary" still red error line.

    This is error message "No keyword with name 'Convert JSON To Dictionary' found. Did you mean: Collections.Convert To Dictionary"

    *** Settings ***
    Resource ../resources/keywords_api.robot
    Library String
    Library Collections
    Library JSONLibrary
    Library RequestsLibrary
    Library OperatingSystem

    *** Test Cases ***
    Run All API Test Cases
    ${json_text}= Get File ${CURDIR}/../data/new_username.json encoding=UTF-8
    ${data}= Convert JSON To Dictionary ${json_text}
    FOR ${item} IN @{data}

    ${payload}= Prepare Payload ${item['name']} ${item['job']}
    ${response}= Send Create User Request ${payload}
    Validate Response ${item['tc']} ${response} ${item['name']} ${item['job']}
    END

    Continue reading...

Compartilhe esta Página