Highlighting

Highlight in 1 line of code using JSONShower

JSONShower supports highlighting in 1 line of code on your documents!

from jsonshower import show_json

# This is in the same format as search results
documents = [
    {
        "image_url": "https://imgs.xkcd.com/comics/voting.png",
    },
    {
        "image_url": "https://imgs.xkcd.com/comics/animal_songs.png",
    }
]

show_json(
    documents=documents,
    image_fields=["image_url"],     # Image fields
    image_width=200,                # Adjust the image width
)

After running this, you should see the following in your Jupyter Notebook:

highlighting.png
Highlight Output