Questions tagged [ndjson]
NDJSON is a newline delimited JSON format.
ndjson
121
questions
0
votes
1
answer
54
views
NextJS v14 architecture to call a LLM
In a NextJS v14 application, I need to call a proxy API that interacts with an LLM. The API returns an NDJSON response, which needs to be processed using the ndjsonStream function from the can-ndjson-...
0
votes
1
answer
35
views
how to read ndjson stream response in php
sorry if my question is silly but there's something I'm not getting.
I'm using Guzzle in a PHP process to make an API call.
$response = $this->client->request('GET', 'droits_acces', [
...
3
votes
2
answers
69
views
PowerShell - ConvertTo-Json how to get ndjson result
I am trying to split 1 NDJSON file into multiple NDJSON files. I am able to consume and split the file, but the problem is the resulting files are in JSON format. Is it possible to output to NDJSON ...
0
votes
0
answers
48
views
How to convert JSON with nested elements to csv in Python?
I try to convert a huge file (~65 GB) into smaller subsets. The goal is to split the files into the smaller subsets e.g. 1 mil tweets per file and convert this data to a csv format. I currently have a ...
1
vote
0
answers
47
views
How to Properly Handle NDJSON (JSON Lines) in a React Native Project
I'm working on a React Native project and need to process a .jsonl (NDJSON) file that is stored locally within my project directory. I've been facing issues trying to read and parse this file using ...
-1
votes
2
answers
55
views
How to get jq to output a long dataset (part 2)?
Suppose I have this ndjson file:
{"id": 99, "labeled_values": [["one", "green"], ["two", "red"], ["three", "blue"]]}
{&...
0
votes
0
answers
21
views
json.loads can't parse valid NDJSON [duplicate]
I try to read a NDJSON file, but I raise the following error.
Traceback (most recent call last):
File "C:/Users/json2csv.py", line 5, in <module>
json_data = json.loads(data)
...
0
votes
3
answers
91
views
How to get jq to output a long dataset?
Suppose I have this ndjson:
{"id": "one", "colors": [{"color": "blue"}, {"color": "red"}]}
{"id": "two", "...
0
votes
1
answer
278
views
polars.read_ndjson(data) nulling out entire columns?
This issue is driving me crazy. I am using the following code to read a .jsonlines file into python:
routes = pl.read_ndjson('~<Path>\az-routes.jsonlines')
Yesterday, it was nulling out a ...
1
vote
2
answers
287
views
Need to modify an existing JQ filter of a GitHub CLI GraphQL response
I am creating a GitHub Action workflow which will call a GitHub CLI API request using GraphQL. This gh api graphql response is --paginate and returns JSON Lines (ndjson).
I created the GraphQL and jq ...
0
votes
0
answers
49
views
How to Implement Spring Boot controller that can accept a batch of records?
I'm currently working on a Spring Boot application where I need to create a service endpoint similar to the one mentioned in the Confluent Cloud documentation (link).
The cURL example provided in the ...
0
votes
0
answers
66
views
How to make a http request in retrofit with nd-json format?
I am using kotlin/java for android. For a module I have to make request to our elasticsearch instance. For multiple queries _msearch elastic search accepts nd-json format.
{} // Index defined here
{} /...
-1
votes
1
answer
141
views
How to configure output in NDJSON format with NLog
I am working on .NET Framework 4.5.2
NDJSON format I require :
Nlog config in xml format for ndjson format given below
{
"timestamp": "[timestamp]",
"level": &...
0
votes
0
answers
526
views
ndjson: TypeError: __init__() got an unexpected keyword argument 'encoding'
When I run the Flask app on my home PC (python 3.10.5), everything works fine. I try to run the same code on pythonanywhere using Python 3.10 and get error:
Traceback (most recent call last):
...
0
votes
1
answer
705
views
Chunked or Streamed output of Azure Function Response with python
the question is very simple. I am in an azure function environment using python as programming language. My goal is to create a nd-json because I have a huge result and I want it to be returned to the ...