Skip to main content
Participating Frequently
Dec 27, 2023 5:48 PM UTC
Answered

PDF Extract API: JSON output file no indent

Please, could I ask if the Extract API JSON output file is indented?

I ran successfully the the following Python code provided in the website: "Extract Text and tables (w/ Tables and Figures Renditions)"

I got the tables, the pictures and the JSON file. However, the JSON file is not indented. I do not know if it is expected to be so I ask just in case. 

Please, find attached the pdf and the JSON file.

Thank you very much 🙂

    This topic is closed to new replies. Start a new post to keep the conversation going.
    Raymond Camden
    Raymond CamdenCorrect answer
    Community Manager
    Jan 2, 2024 3:10 PM UTC

    Check your editor, or how you view JSON files in general. I use Visual Studio Code and it can pretty up JSON nicely.

    4 replies

    Raymond Camden
    Community Manager
    Community Manager
    Jan 2, 2024 3:01 PM UTC

    White space and indentations do not matter in a JSON file. Are you asking if the JSON file contains _information_ about indentations in the PDF? If so, that's a different question.

    Translate
    Participating Frequently
    Jan 2, 2024 3:07 PM UTC
    Hi Raymond,

    Thank you very much for your quick response 🙂

    It was only that for me it is easier to check at a first view if the
    information is correctly extracted when the JSON file is indented.

    As I was reading some posts in the Forum with indented JSON files attached
    so I thought that maybe the service was providing indented JSON files too.

    Again, thank you very much.

    Regards,
    Maria
    Translate
    Raymond Camden
    Community Manager
    Raymond CamdenCommunity ManagerCorrect answer
    Community Manager
    Jan 2, 2024 3:10 PM UTC

    Check your editor, or how you view JSON files in general. I use Visual Studio Code and it can pretty up JSON nicely.

    Translate