Found 208 Articles for JSON

How to select values from a JSON object using jQuery?

Tarun Singh
Updated on 10-May-2023 13:01:39

6K+ Views

JSON or JavaScript Object Notation is a lightweight format used for data interchange between web applications and servers. It provides a simple and easy-to-read structure that can be parsed and generated easily by machines. JSON is often used as an alternative to XML because it is more compact and easier to work with. In this article, we see how to select values from a JSON object using jQuery with different approaches. What is a JSON object? A JSON object consists of a collection of key-value pairs separated by colons. Here keys are known as strings and the values are of ... Read More

Using data in JSON format in Snack

Saba Hilal
Updated on 02-May-2023 14:43:09

699 Views

There are lots of ways to use data with apps made with Snack Expo. Sometimes the data is stored as JSON, that mean JavaScript Object Notation. In this format, the data can be stored easily as Key-Value pairs and can also be converted to a CSV file. In this article, using javascript on Snack, the methods to use JSON data are specified. In example 1, the method to read this data and to display it as a table is given. In the second example, the methods of saving the JSON data as a CSV file and to download it, is ... Read More

Difference between BSON and JSON

Pradeep Kumar
Updated on 19-Apr-2023 17:35:33

1K+ Views

Several modern apps use the data transmission and storage formats BSON and JSON, which are both widely used. Both BSON and JSON are built on key-value pair formats, despite the fact that they differ in a number of important aspects. Developers must be aware of the differences between BSON and JSON in order to choose the best format for their application. In this tutorial, the similarities and differences between BSON and JSON, as well as their advantages and disadvantages, will be covered. We will also go through how to convert between the two formats and provide examples of when ... Read More

Basics of JSON with GoLang

Sabid Ansari
Updated on 06-Apr-2023 11:59:21

510 Views

JSON has grown in popularity as a data format for transferring data across apps in recent years. JSON (JavaScript Object Notation) is a compact and simple-to-understand standard for exchanging data. It is widely used in server-to-server communication, mobile applications, and web applications. Its simplicity, concurrency, and scalability make GoLang a powerful programming language. The fundamentals of JSON with GoLang will be covered in this post. What is JSON? JSON is a simple, lightweight data exchange format that is simple for both people and robots to comprehend and generate. It is a completely language-independent text format that adheres to principles that ... Read More

Guide to Linux jq Command for JSON Processing

Bamdeb Ghosh
Updated on 29-Mar-2023 13:58:48

13K+ Views

Introduction JSON (JavaScript Object Notation) is a popular data format used for exchanging information between applications. It is a lightweight and easy-to-understand. To process JSON data efficiently, Linux provides a command-line tool called jq. This powerful tool enables users to extract, manipulate, and transform JSON data with ease. With jq, users can quickly perform a wide range of tasks on JSON data, including filtering, sorting, and selecting specific fields. Additionally, jq supports a variety of output formats, making it easy to integrate with other command-line tools. In this article, we will explore the jq command and its various features and ... Read More

Interesting facts about JSON

Prabhdeep Singh
Updated on 02-Mar-2023 15:10:47

724 Views

JSON stands for JavaScript Object Notation, basically, JSON is frequently used with JavaScript, it was initially meant to be a subset of the JavaScript programming language. However, JSON is a language-independent data format. In this article, we are going to learn about JSON and also their interesting facts with examples. Introduction to JSON When data can be transported and stored in a simple format is called JSON, or JavaScript Object Notation. Arrays, objects, names and value pairs, and other data types can all be found in JSON. The format uses quotation marks, brackets, parentheses, semicolons, and colons as punctuation. ... Read More

Reading a JSON file using Swift

Nitin Aggarwal
Updated on 28-Feb-2023 13:08:43

12K+ Views

In this article, we will see some examples of how we can read the JSON file using JSONSerialization and JSONDecoder classes. Nowadays, these classes are used in most iOS applications to work with JSON files. You can use the JSONSerialization class to read the JSON file in the Swift language. In order to read a json file, first you will require to convert it into a string or data object. After that, you can pass the string or data object to JSONSerialization class to convert it into a dictionary or array object. JSONSerialization The Foundation framework for iOS and macOS ... Read More

How to add an element to a JSON object using JavaScript?

AmitDiwan
Updated on 16-Feb-2023 15:29:18

29K+ Views

In this article, you will understand how to add an element to a JSON object using JavaScript. JSON object literals are keys and values are separated by a colon surrounded by curly braces {}. Example 1 In this example, we add an element to a json object using bracket notation, var jsonObject = { members: { host: "hostName", viewers: { userName1: "userData1", ... Read More

Explain how to extract value using JSONPath.

Debomita Bhattacharjee
Updated on 22-Nov-2021 09:59:08

4K+ Views

We can use JsonPath in Rest Assured to extract value. This is done with the help of the jsonPath method (which is a part of the JsonPath class). After that, we need to use the get method and pass the key that we want to obtain from the JSON Response.We shall first send a GET request via Postman on an endpoint and observe the JSON response. Here, the keys are userId, id, title, and body.ExampleCode Implementationimport org.testng.annotations.Test; import static io.restassured.RestAssured.*; import io.restassured.RestAssured; import io.restassured.http.ContentType; import io.restassured.path.json.JsonPath; import io.restassured.response.Response; public class NewTest {    @Test    void getValueJsonPath() {   ... Read More

How to return a JSON object from a Python function in Tkinter?

Sarika Singh
Updated on 23-Nov-2022 07:50:53

2K+ Views

JavaScript Object Notation, or JSON is a simple data format that is used to exchange data between many different languages. It is simple to read for people and simple for computers to parse. Python reads JSON text as a quoted-string that contains the value in each key-value mapping. Once parsed, it is accessible in Python as a dictionary object. JSON data can be encoded and decoded using the built-in package json in Python. You must first import the json library in order to work with files of the json type. Purposeco JSON Python to JSON conversion is done using serialization. ... Read More

Advertisements