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
0answers
48 views

Unable to read a 'second' json file from inside a 'for' loop (Lua+Latex)

I'm looping through a json file and displaying content in the format below: Zone 1 Projection(Main.tex) Grat Table(gratsection.tex) Zone 2 Projection (Main.tex) Grat table (gratsection....
1
vote
1answer
50 views

Dynamic tikz bar plot from JSON data

I have JSON file that looks something like this { "data": [ { "type": "SENIOR", "male": 350000.0, "female": 225000.0 ...
1
vote
0answers
69 views

(Lualatex)How to loop over an array of JSON objects

How do I loop over MP in the JSON below and print the key/value of the objects into a table? { "MP": [ { "A": "A1" }, { "B": &...
0
votes
1answer
70 views

Split table cell to multiple rows based on array length and PRESERVE ORDER

I'm reading a json file and writing to table but want to split one cell of the table based on the number of values in the array..How do I achieve this inside Lua? using JSON.lua package by Jeffrey ...
1
vote
0answers
70 views

It takes long time to built file

I made this file: \documentclass[uplatex, dvipdfmx]{jsarticle} \begin{document} \LaTeX \begin{equation} x^2 + y^2 = 5 \end{equation} \begin{equation} x^2 + y^2 = 13 \end{equation} \end{...
4
votes
1answer
456 views

How to plot data from json

Given a json file in the following format: "name":"list_of_xy_values", "data":[[1,2],[2,4],[3,6],[4,3],[5,0]] I'd like to import data to my document to plot it with tikz/...
1
vote
0answers
893 views

LaTeX listings package JSON formatting

I am using package listings for JSON data. I am following this example How to improve listings display of JSON files from this stackexchange answer. It generates the following output: I added caption ...
1
vote
2answers
311 views

How to convert a nested array in a json file into a matrix and a table in LaTeX

I would like to read a nested array such as the following in a json file into the LaTeX and convert it into a matrix with each base array becoming a row, and a table with each base array becoming a ...
0
votes
1answer
335 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
312 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
77 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} \...
4
votes
0answers
2k 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 ...
3
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
395 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
102 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
979 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
110 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 ...
4
votes
1answer
2k 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
736 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 ...
5
votes
1answer
15k 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
272 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 ... ...
4
votes
1answer
3k 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? ...
4
votes
2answers
3k 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'...
22
votes
4answers
14k 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
1k 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 ...
9
votes
2answers
8k 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)?
49
votes
2answers
65k 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]...