Questions tagged [json]

JSON (JavaScript Object Notation) is a 100% textual data interchange format originally inspired by JavaScript objects. It is widely used in RESTful web services. Parsers for JSON exist in nearly all languages, and libraries also exist which can deserialize JSON to native objects or serialize native objects to JSON.

Filter by
Sorted by
Tagged with
0
votes
1answer
44 views

Templating with Scriban

I want to create a PDF with dynamic data from a JSON object. I'm vaguely familiar with LaTeX and minimally familiar with Templating Engines and I'm struggling with how to implement the engine and ...
2
votes
1answer
95 views

LaTeX3 - Read Json as Input in LaTeX3

I would like to generate LaTeX template based on JSON Input. It is possible to take JSON as input in LaTeX3 and create LaTeX template? I had the solutions are found in LuaLaTeX. Ways to parse JSON in ...
0
votes
0answers
49 views

Listing: custom syntax highlighting for JSON?

I created the following custom language definition for JSON, based upon the syntax highlighting offered by IntelliJ IDEA for JSON. % Custom colours \definecolor{numbers}{HTML}{0000FF} \colorlet{...
0
votes
0answers
51 views

How to write in arabic using lstlinsting for the JSON and XML environment?

I'm an IT developer, and for some reason I've JSON and XML to make in report but with Arabic. For JSON and XML environment I'm using this: \documentclass{report} \usepackage[latin1]{inputenc} \...
0
votes
0answers
20 views

Problem with arabic texts when using vim

How can I read some Arabic text from another file (JSON file or whatever) and implement it into a tex file?
2
votes
0answers
408 views

Highlight JSON code snippet with minted

I have a JSON code snippet that I like to include into my LaTeX document: "builders": [ { "type": "test", "image": "ubuntu:latest", "changes": [ "EXPOSE 123 ...
2
votes
1answer
2k views

How to loop over the JSON object / list?

I want to loop over section in the following JSON and print name the number of times it appears under section. How could I do this? { "ID": "23", "section": [ { "name": "A", ...
0
votes
1answer
189 views

Error as I try to read and display the results from JSON file [closed]

I am trying to read a JSON file and trying to display some of its content. But as I try this, I get an error saying attempt to call a nil value as also shown below. I could not understand the reason ...
1
vote
1answer
66 views

Word wrap 64 character hexadecimal strings in verbatim JSON

I'd like to document example requests/replies in our protocol per How to write narrative documentation. We're using the texlive-latex-base on Ubuntu for our documentation, and I'm linting with lacheck ...
1
vote
1answer
607 views

How to assign variables from a [json|yaml|toml] file

I have two Latex files for a weekly document I create. template.tex contains a large list of variables that get changed each week: \newcommand{\var}{foo} \newcommand{\othervar}{bar} Then the ...
1
vote
0answers
87 views

Make Asymptote read YAML or JSON files

I often write my data-files from simulations written in Python or C++ in json on yaml files. I recently heard about the asymptote software which can be used for really 2d and 3d plotting. Is it ...
3
votes
1answer
1k views

Load fields from JSON file using LuaLatex

I want to load a lot of numbers in my document from a single JSON file that is returned from a simulation. To do that I so far followed this stackexchange answer but for multiple values I would have ...
3
votes
1answer
592 views

Parse JSON for Dropbox path

I keep all my tex files in a Dropbox directory, but different computers (all Windows-based) have different user names, so I would like to define a command in my template that is the Dropbox path, to ...
4
votes
1answer
13k views

Simple coloring of json attributes

Could someone please explain me how I can color the json attributes for a json string in listing? An example would be great. Thanks. Example String: {"name1":"attribute1","name2":"attribute2"}. How ...
0
votes
1answer
208 views

How to fix or change randomly marked json snippet?

So my problem is that my json snippets are marked red, but I don't want to mark them red. How my JSON looks like: [ {obj1} {obj2} {obj3} ] And my snippet looks like: [ {obj1} ... ] And that ... ...
3
votes
1answer
2k views

Dynamic Table based on Json File

I'm trying to add in a dynamic table based on a two-dimensional array that is stored as JSON in a file on the disk. I've got no control of the file, as it gets pulled in from a web-service and ...
5
votes
1answer
1k views

make all values of the JSON format red

I am using the latex beamer and trying to get the true value of the flag key in the JSON format red too but I am just getting it black as shown in the screen shot below. How can I get it red too? ...
3
votes
2answers
2k views

API JSON in Latex

I want to know if it's possible to get data from a website using api json in a document .tex I want to do this without luatex because the idea is compile online with the sharelatex website, that does'...
21
votes
3answers
10k views

Ways to parse JSON in LaTeX?

I'm writing my recipes (food) in a small textfile in JSON. Are there any ways to parse this in LaTeX? I know, that are lots of templates dealing with recipes, but I want to have my own style, which ...
1
vote
0answers
873 views

How can I typeset JSON code with the listings package? [duplicate]

I got this error with the listings package (v 1.5c). Should I install the language manually? ! Package Listings Error: Couldn't load requested language. See the Listings package documentation for ...
8
votes
1answer
7k views

How can I highlight JSON string values but not attributes?

example { "name" : "alan", "alias" : "nala" } If I use morecomment=[s][\color{red}]{"}{"}, How can I highlight JSON string values (on the right side) but not the attributes (left side)?
40
votes
2answers
50k views

How to improve listings display of JSON files?

I was wondering if there is a good way for JSON files to be listed with the listings package. The only language definition I could come up with, is this: \lstdefinelanguage{json} { morestring=[b]...