/r/json
Anything JSON! JSON is a super simple serialization format that was discovered by Douglas Crockford. It's a subset of JavaScript syntax. It is extremely popular for web and mobile apps. There are implementations in virtually all programming languages, including JavaScript, Ruby, Python, Java, Scala, Clojure, .NET, and Objective C. Some databases, including CouchDB, speak JSON natively.
/r/json
imm not sure why but i feel like excited and eager to learn JSON, im business student that works in ERP System. FYI, i never learn or know about JSON, i just know its a programing language , is it? and i want to try learn by myself day by day. hopefully i will love it LOL!! i just want to add on my skills and i love to learn new things :) any tips for beginner with zero background for me?
Hey r/JSON,
If you’ve ever had to process complex JSON responses from APIs, you know how difficult it can be to manage nested data or filter results efficiently. That’s one of the reasons we built 'jx', a tool that allows you to use JavaScript syntax for JSON manipulation, speeding up development for anyone familiar with the language.
Key Features:
Here’s an example of how 'jx' simplifies working with nested data:
jq:
jq '.users[] | select(.active == true) | .profile.email'
jx:
jx 'this.users.filter(user => user.active).map(user => user.profile.email)'
If you regularly work with APIs, you’ll find 'jx' faster to pick up and deploy in production environments. You can find more examples and the full documentation on GitHub: github.com/TwoBitCoders/jx. Let me know how it works for you!
Hello,
I have a huge json data file (300+ MB) that I have opened in OK JSON and I am trying to get about 200 specific observations so that I can put it into SPSS for analysis. Each observation has different sub details that I want to save as well (see image)
I have some limited experience with creating syntax in SPSS and Stata, but I do not have experience using things like Python (which is downloaded onto my computer) or R. For some reason, OK JSON will not let me delete the other observations and the file is too big to import into excel.
If anyone has any advice, that would be much appreciated!
I have a .Net object that is a List(Of Actions), where Actions is a CRUD record from a DB. So for instance you might have a delete object with a key, or an update with a key and a List(Of FieldChanges).
As the outermost object is an array, I wrote some JSON using StringBuilder like this...
[
"delete": {"key":12345},
"delete": {"key":54321},
"update": {"key":54321,"field":"Name","value":"Bob Smith"},
etc...
]
JSONLint, an online tool, tells me this is invalid because of the [ ]. Is that true? Does the outermost object in the file have to be a { } collection? If so, how would you handle this case?
I am also curious if this is non-canonical as they are individual entries inside. Would it be "more correct" to do this...[
"delete": [
{"key":12345},
{"key":54321}
]
"update": [
{"key":54321,"field":"Name","value":"Bob Smith"},
etc...
]
]
Or is it just a matter of personal choice?
Guys currently I have assigned to work which involves reading a pdf document using json file and capturing certain fields what exactly am I doing ? I am new to this so just asking
I have searched many places but I was not able to find an answer. May be it does not exist? I am not sure. Please help.
I have this Oracle SQL code:
declare
json_obj JSON_OBJECT_T;
json_arr JSON_ARRAY_T;
begin
-- initialize
json_obj := json_object_t('{"PHONE_NO":[]}');
json_arr := json_array_t('[]');
json_arr := json_obj.get_array('PHONE_NO');
-- start loop here
json_arr.append(phonenumber_n);
-- end loop here
json_obj.put('NAME', 'JOHN');
l_return := json_obj.to_string();
The output is like this: -- assuming 2 phone numbers found
{"PHONE_NO":[1235551111, 1235552222], "NAME": "JOHN"}
While this is all good, but what if there is no phone number found in the loop. It will look like this:
{"PHONE_NO":[], "NAME": "JOHN"}
However, I wanted it to look like this:
{"NAME": "JOHN"}
Where do I put the 'ABSENT ON NULL'? Do I manipulate in the L_RETURN?
Thank you very much.
(I hope I got the formatting correct.)
Curious to hear what you think of the approach described in this article:
https://dashjoin.medium.com/json-schema-openapi-low-code-a-match-made-in-heaven-d29723e543ac
It leverages the JSON Schema from an OpenAPI spec to render a form. The form contents is then POSTed to the API.
I can't seem to find any helpful info online. Basically, I have an extremely nested json file in my s3 bucket and I want to run a crawler on it. I've already created a classifier with json path $[*], among other attempts. It always seems go fail on "table.storageDescriptor.columns.2.member.type" saying member must have length less than 131072.
I assume glue is inferring the entire file as one gigantic array and I have no idea where to go from here. Anyone have any cloud experience and can offer some guidance?
I'm looking to create an inventory system that exports to JSON for easy and quick file transfer. It's not like a warehouse size of things. 100 different items maybe.
My question is: would that probably be a relatively small file (a few kb) or would that become quite large (over 1mb) for transferring long distances?
Forgive me for another "help me" post but I'm truly struggling.
At my job i started recently we use two main programs for utility pole loading analysis. One is katapult & the other is SPIDAcal. Shorten visual of work flow for context:
Both have APIs but we are currently entering all the information 1 by 1, extremely unproductive. I have access to both of githubs but can't seem to find the information i'm needing. I have very little experience with any of this but am eager to learn. The biggest hurdle is that the two programs use different identifiers for equipment used. It would be a lot easier if our katapult designers entered all the information katapult requires for ease of export. However, management has decided that this would take too long as they have a higher work load. So, i guess i'm looking for a way to make *something* that can export for katapult, read what its saying and translate it in a way that spidacal understands with minimal errors.
Is this possible? Here are the githubs https://github.com/spidasoftware
I have some GPX data I would like to format into a GeoJSON format pasted in below. The GPX data is in a dataframe in R, with variables longitude, latitude, elevation, attribute type and summary. I would like some code to format the dataframe so the output is like below. With the feature segment generating a list when the attributeType changes.
TLDR: How do I get GPX data in a readable format to be used here here
const FeatureCollections = [{
"type": "FeatureCollection",
"features": [{
"type": "Feature",
"geometry": {
"type": "LineString",
"coordinates": [
[8.6865264, 49.3859188, 114.5],
[8.6864108, 49.3868472, 114.3],
[8.6860538, 49.3903808, 114.8]
]
},
"properties": {
"attributeType": "3"
}
}, {
"type": "Feature",
"geometry": {
"type": "LineString",
"coordinates": [
[8.6860538, 49.3903808, 114.8],
[8.6857921, 49.3936309, 114.4],
[8.6860124, 49.3936431, 114.3]
]
},
"properties": {
"attributeType": "0"
}
}],
"properties": {
"Creator": "OpenRouteService.org",
"records": 2,
"summary": "Steepness"
}
}];
Hi, my capabilities file is as follows
{ "dataRoles": [ { "name": "Category", "kind": "Grouping", "displayName": "Brand" }, { "name": "Measure", "kind": "Measure", "displayName": "Percentage" } ], "dataViewMappings": [ { "categorical": { "categories": { "for": { "in": "Category" }, "dataReductionAlgorithm": { "top": {} } }, "values": { "select": [{ "bind": { "to": "Measure" } }] } } } ], "objects": {}, "privileges": { "data": [ "read" ] } }
I get an error when building of "array should be . privilages"
I've run it through chatgpt to try fix and it cycles between array should be .privelages to object should be privileges[0]
Any ideas ?
Hello everyone,
I'm trying to get the phone numbers and e-mail adresses of all the town halls in France (there are 35 000 of them).
All of these phone numbers and e-mail adresses are public and gathered in a JSON file issued by the government. The JSON file is for all to use, and it's used by common people in databases, digital phone books, etc.
I would like to extract phone numbers and e-mails with the help of some homemade program. The thing is, I am quite noob at programming. I know the very basics, but that's all.
How should I proceed? Is there a programming language better suited for this ? It seems Python is the way to go. Also, can a noob like me achieve something like this? With the help of chatGPT maybe?
Thank you all in advance for your help.
I want to make my expo go react native aplication run on android, but this pops up un expo go:
Uncaught Error: org.json.JSONException: Value <! doctype of type java.lang.String cannot be converted to JSONObject
What can i do??? How can i convert it?
Hi All,
I am trying to update a JSON data in a word document, but when I paste it, it is pasted just as normal data, with the color of key/value pairs removed, just updated as normal text. How can I paste it in proper JSON format, withe key/value pairs highlighted in color, etc.,
Thanks,
Gopi
Hi everyone.
I need to test several JSON files (done from After effects). They work fine in Android, but they don't in IOS. Sending each test to the developer takes a long time. Is there a way to test the files in an IOS environment or simulator from my pc or iPad? (I'm sorry, im a not a programmer, just an animator, so for me this is alien language) thanks.,
Does this mean my phone is being tracked? I don't even know if this is the right place to ask..
{ "title": "Endpoint", "javaType": "com.tmobile.myaccount.consumer.clienttracingconsumer.pojos.ClientSpanEndpoint", "type": "object", "properties": { "serviceName": { "type": "string", "description": "Classifier of this endpoint in lowercase, such as "acme-frontend"" }, "ipv4": { "type": "string", "description": "The text representation of a IPv4 address associated with this endpoint. Ex. 192.168.99.100" }, "ipv6": { "type": "string", "description": "The text representation of a IPv6 address associated with this endpoint. Ex. 2001:db8::c001" }, "port": { "type": "integer" } }, "additionalProperties": false }
So basically i have a robotfile i have to try the keywrods using slack by creating an app and putting the token of it in the robotfile so i can try the keyword but my problem is that im using library rpa.json but it keeps on showing error on it and saying that its undefined library even tho i download it so when i run the code its not working
Hi.
Developer team says ther JSON file I send (which is being exported from After effects) gives this error. Does anyone know what it might be related to?
"undefined" != typeof navigator
------------^
Expecting 'EOF', '}', ':', ',', ']', got 'undefined'
thanks!
I am consuming a third party API in my Spring boot application that returns a JSON payload. Sample below:
{
//There could be multiple payload type. if payload is of type "order", child element will ONLY be "order_details" (below).
"payload_type":"order",
"order_details":{
"order_id":"123",
"item_id":"abc",
"other_fields":"some other fieds related to this order"
}
//If payload is of type payment, child element will also have "payment_details" IN ADDITION to "order_details" (below)
"payload_type":"payment",
"order_details":{
"order_id":"123",
"item_id":"abc",
"other_fields":"some other fieds related to this order"
},
"payment_details":{
"payment_id":"789",
"method":{
"type":"credit_card|paypal"
},
//If "type" is "credit_care", then child element will be card_details (as shown below). if "type" is "paypal", then instead of card_details, child element will be "paypal_details".
"card_details": {
"card_number":"1234 5678 ...",
"exp":"02//2026",
"cvv":"123"
}
}
//If payload is of type return, child element will also have "return_details" IN ADDITION to "payment_details" and "order_details" (below)
"payload_type":"return",
"order_details":{
"order_id":"123",
"item_id":"abc",
"other_fields":"some other fieds related to this order"
},
"payment_details":{
"payment_id":"789",
"method":{
"type":"credit_card|paypal"
}
},
{
"return_details": "all the child elements for return"
}
I am writing a Java program to parse this JSON. my goal is to write a Java parser program that works like this..
One way I can write this parser is to write a lot of if-else blocks checking the "payload_type" first and then writing the subsequent if-else for all other blocks.
Do you know of any other simpler way to write this mapping from JSON to different Java POJO based on the "payload_type"? Any library or utility that support this level of transformation?
Hi everyone.
I'm not even a newbie. I'm an illustrator and my client's programmer has required that the animations are sent as a JSON file. I did the animations in After effects.
Ok, so I go a plugin that exports the animation as JSON. The app is being programmed in Figma and they need the images to be embedded in the JSON file. These animations have transparent background, don't know if that is relevant.
The issue first, was the individual animations were way too heavy. So I downsized them to around 250 kg each.
Now the issue seems to be that the stand alone JSON creates an error (waiting on them to send me the error).
So I sent the default JSON file the plug in provides, which creates the attached image's structure.
They say they changed the images URL in the JSON file, but the images are still not showing in the app. I dont know how to attach code to a post but i some explains me how to do it..., could anyone help me here? I cannot afford to lose this client.
Thanks