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
1 answer
156 views

I am trying to post json arrays as text in LaTeX

as the title states I'm trying to have my json arrays be posted as text in LaTeX. I'm using VSCode as editor. I'd like to have this json array be posted as a list in LaTeX but can't figure out how to ...
Robert's user avatar
  • 1
2 votes
2 answers
146 views

Define categorized, changeable variables for use throughout a document

TL;DR How do I print categorized and subcategorized values declared in a JSON file (or in some similar type of file) inside of a LaTeX document? In my document, I am assigning a bunch of values to ...
Ben Zelnick's user avatar
0 votes
0 answers
232 views

use bibjson with latex

I'm trying to use bibjson for a LaTeX document. Here are my files: ecm.tex \documentclass{article} \begin{document} Hello \cite{foo_ref}. \bibliographystyle{unsrtnat} \bibliography{ecm} \...
Laurent Claessens's user avatar
0 votes
1 answer
104 views

Add two text column into a frame

I'm new to Latex and to Lyx as well. I'm trying to create a frame in Lyx containing 2 columns, the first one being JSON formatted text, and the second one being comments of the lines of the fist ...
Ariel's user avatar
  • 103
0 votes
0 answers
106 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....
24suns's user avatar
  • 37
2 votes
1 answer
304 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 ...
Almic7's user avatar
  • 131
1 vote
0 answers
258 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": &...
24suns's user avatar
  • 37
0 votes
1 answer
83 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 ...
24suns's user avatar
  • 37
1 vote
0 answers
1k 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{...
valcuria's user avatar
5 votes
1 answer
1k 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/...
Sim Son's user avatar
  • 264
2 votes
0 answers
4k 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 ...
Raja Ayaz's user avatar
  • 123
1 vote
2 answers
667 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 ...
Hans's user avatar
  • 115
0 votes
1 answer
698 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 ...
tblev's user avatar
  • 171
2 votes
1 answer
984 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 ...
Balaji's user avatar
  • 127
0 votes
0 answers
241 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} \...
ATTAFI Billel Abd Rezak's user avatar
6 votes
0 answers
3k 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 ...
Kyu96's user avatar
  • 277
3 votes
1 answer
4k 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", ...
Amanda's user avatar
  • 387
0 votes
1 answer
554 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 ...
Amanda's user avatar
  • 387
1 vote
1 answer
132 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 ...
Iiridayn's user avatar
  • 163
1 vote
1 answer
2k 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 ...
Ian Pringle's user avatar
1 vote
0 answers
173 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 ...
smilingbuddha's user avatar
4 votes
2 answers
3k 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 ...
user45893's user avatar
  • 171
3 votes
1 answer
830 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 ...
Shffl's user avatar
  • 207
6 votes
1 answer
17k 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 ...
aries's user avatar
  • 173
0 votes
1 answer
294 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 ... ...
Satnam's user avatar
  • 141
6 votes
1 answer
4k 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 ...
Ovi's user avatar
  • 163
5 votes
1 answer
2k 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? ...
TheBook's user avatar
  • 899
4 votes
2 answers
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'...
Sara Rodriguez's user avatar
8 votes
7 answers
18k views

Convert RIS or NBIB or JSON to bibtex?

This article is not in Google Scholar, and they offer citations in RIS, NBIB, and JSON. So the big question is, how can I convert this to bibtex? Here is how it looks in JSON: {"source":&...
Jasmine Lognnes's user avatar
22 votes
4 answers
19k 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 ...
user3417078's user avatar
1 vote
0 answers
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 ...
Francesco's user avatar
  • 4,564
9 votes
2 answers
10k 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)?
keepscoding's user avatar
53 votes
2 answers
89k 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]...
polemon's user avatar
  • 3,525