Join the social network of Tech Nerds, increase skill rank, get work, manage projects...
 
json

Featured

Parse Json Object with dynamic keys using Gson

Gson is a java library which converts Json to Java object and vice versa. This blog is about how we can parse Json data to Java Object where keys are dynamic created. 1. Json Sample text is:- { "data": { "status_code": "101", "...

How to restrict a list of domain name in Email validation using JS with demo

If you want to validate your email field with a list of domain name and normal email validation, then we can do that with the help of following code: HTML: <div class="form"> <input id="emailAdd" type="text" onkeyup="emailVal()...

Sending JSON data from one HTML page to another using Session

Here is the code of the send.html file: <ul id="ul-list"> <li><input type="text" class="input-text"><input type="text" class="input-text"></li> <li><input type="text" class="input-text"><i...

How to implement push notification plugin in phonegap

Push notification plugin supports receiving notification in your phonegap application. It can also handle the notifications received. It supports multiple platforms like android, iOS, windows. Installing the Plugin: You have to run the foll...

How to send notifications to different devices using UrbanAirship

Urban Airship provides a number of REST API endpoints, collectively known as the Urban Airship API Version 3.  It provide different different rest API such as Push,Send Push,Validate,Push Object etc. Here below is the example of "Pus...

Getting object values from json data

Getting object values from Json: If you have a data in Json format and you need to retrieve the object values from that day, it can be easily done using Java.   Lets see an example,  If you are using maven add the following ...

Creating object in Json format using java

Json object: You easily write your object in json format with java . Json format is used because it becomes easy to exchange information in this form. It is easy to understand and easy to write. Lets see an example,  If yo...

Convert Xml to Json format using java

Xml to Json conversion: Lets see with the help of example. Following jars are required for conversion: apache-commmons json-lib ezmorph Suppose we have the xml file with name demo.xml with the following data: ...

jQuery $.ajax()

$,ajax() allows to make an ajax call. This method provide more control than any other method. In the ex below all the parameters  and comment related to each parameter describe the purpose of each one. var ajaxUrl = "Json.htm"; ...

jQuery getJson

getJson is the method that is used to call the json data by ajax call. We can only pass the parameter using the get method. ex of json call function and the data displayed. var jsonUrl = "Json.htm"; $("#btnJson").click(function () { ...

Parsing JSON objects using Mantle framework in Objective C

Hi Readers, Mantle is latest and reliable framework which we can use while parsing JSON objects coming from server end. We can do this by simply initialize a class of type MTLModel. We can understand framework working with following example...

JSON data insert into MySQL using PHP

We can insert the json data in to mySQL using php .please see the below example for processing json data to mySQL. Example : - Suppose we have a file having json data like below - {"FirstName":"ravi", "LastName":"srivastva"} ...

Send a request using Alamofire in swift

Use the alamofire in swift first install the pod file in your project using below steps: 1- open the terminal and run following commands sudo gem update --system sudo gem install cocoapods pod setup change folder to the current proejct ...

Include Empty/Null Variable to Json while serialize with Gson Android

Are you using Gson for Serializing Json String from Java Bean/Model class? If yes then It may be useful for you. Gson ignore null/empty value while serialize Object to Json String. Like Gson gson = new Gson(); String jsonData = gson.to...

Send data through ajax call and receive Json response from controller in Springs

Here is the sample code implementing ajax call to send the data of a form to the controller and receiving json response from controller. Student.java Create a java bean class and generate setter and getter. public class Student { ...

Simple way to convert Json data to Java Model/Bean/Pojo

There is easy way to create Pojo/Bean class for any Json scheme. http://www.jsonschema2pojo.org/ Convert json data to Gson Pojo class: Copy and paste Json text to http://www.jsonschema2pojo.org/ Enter package name and class name f...

Read the Specific JSON Property

The below Example will show you how to read the specific property from the file in JSON format or to read the Specific property from the JSON data. emp.txt { "id": 123, "name": "Manish", "phone": [ 123456, 987654 ], ...

JSONP concept

JSONP stands for JSON with padding. All the browsers follow the same origin policy. You can not send XMLHttpRequest to other domain. To prevent this security, we need to use the JSONP in ajax request. When we request a ajax call to the remote ser...

Sample application using JQuery, Spring MVC @RequestBody and JSON together

See the below steps to create sample application using JQuery, Spring MVC @RequestBody and JSON : 1- Define dependency for Spring, JSON in pom.xml as below: <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/...

How to convert Model Object into JSON string and JSON string into Model Object in Java?

Sometimes we need to get JSON string direct from Model object and to read JSON values from Model object. We can do this functionality very easily by using Jackson Mapper. Follow to steps in order to do conversion from Model Object to JSON stri...

How to parse JSON using PhoneGap

Follow the below steps to parse JASON in PhoneGap. Step 1. Call Js function From html page or from where we want, like this function onBodyLoad() { document.addEventListener(deviceready, callJson, false); } Step 2. Create a functio...

Send JSON Objects with an ajax request

Hi, To send an ajax request, we have number of functions in jQuery. But to send JSON object along with the request, I chose jQuer.ajax(). It takes various parameters url, type, data, dataType, beforeSend etc. See below steps jQuery.aja...

Read and Write JSON data in MySQL

Store JSON in MYSQL:- Here below snippet will show you how we can store json data in mysql and read the json data from mysql and convert into a java object. Remember that the field where you can store the JSON data in mysql to set data type of t...

How to iterate Object List in JavaScript

Sometimes we need to send data from Controller to JSp. Here I'm going to explain how we can send and iterate Object List in JSP file. You can do this easily by following the below steps: 1- Define the below dependency in you pom.xml file for...
Sign In
                           OR                           
                           OR                           
Register

Sign up using

                           OR                           
Forgot Password
Fill out the form below and instructions to reset your password will be emailed to you:
Reset Password
Fill out the form below and reset your password: