Data to JSON string

    0

    20

    json
    Python public recipes

    Encode Python data structure to Json

    Example

    json_content = {"key1": value1,"key2": value2}
    json_dump = json.dumps(json_content)
    

    Shortcut: json.dumps

    import json
    
    json_content = {"key1": value1,"key2": value2}
    json_dump = json.dumps(json_content)
    Codiga Logo
    Codiga Hub
    • Rulesets
    • Playground
    • Snippets
    • Cookbooks
    Legal
    • Security
    • Privacy Policy
    • Code Privacy
    • Terms of Service
    soc-2 icon

    We are SOC-2 Compliance Certified

    G2 high performer medal

    Codiga – All rights reserved 2022.