Share on Google+Share on Google+

vrushali suryawanshi
1 Answer(s)      6 years and 8 months ago
Posted in : JavaScript Questions

how to get data in json object from database

View Answers

March 4, 2011 at 12:59 PM

How to get data in json object from database

<%@ page language="java" import="net.sf.json.JSONArray,java.sql.*,java.util.*" %>

  Connection con = DriverManager.getConnection("jdbc:mysql://localhost:3306/test", "root", "root");
  Statement st=con.createStatement();
  ResultSet rs=st.executeQuery("select * from employee where id=1");
  JSONArray arrayObj=new JSONArray();
<h2>Array Object is =></h2>
<%  for(int i=0;i<arrayObj.size();i++){  %>


Related Tutorials/Questions & Answers:
json  how connect ajax with json
json  how to get data in json object from database
data is transferred and how it is encoded. While JSON is a tool used for describing values and objects by encode the content in a very specific manner. 2)JSON... in JavaScript.While AJAX uses JSON format to communicate between client
json   how to develop iphone web service application using json. Please help me by giving any link where I could find an example or any help will be anticipated
it using JSON   The given code parse the message in JSON in JavaScript. You can parse the message with JSON in JavaScript by using the method "String.parseJSON(filter)". It parses the JSON message to an string or object
JSon Tutorial
JSon Tutorial  What is JSon? Where i can find the JSon tutorial? Thanks!   JSon Tutorial
JSON with Java
JSON with Java  How to request Json From URI and to parse and to store the values in Java array
Siverlight JSON
Siverlight JSON  how to use JSON in silverlight, i need to populate dynamic data by using JSON CAN ANY HELP ME   Hi Friend, Please go through the following link: http://www.roseindia.net/tutorials/json/ Thanks
json and android
json and android  how can i use a json string [{"Id":10,"News":"sportnews"}] and fill a spinner for a android app?. i tried and i got a: AndroidRuntime:android.widget.ArrayAdapter.createViewFromResource(Adapter
Ajax json
Ajax json  Hi, How consume json file in ajax program? Thanks
JSON to HashMap
JSON to HashMap  Hi, How to convert a JSON String to HashMap in Java... following code for conversion of JSON String to HashMap: String jsonString = "Your JSON string"; HashMap<String,String> map = new Gson().fromJson
JEE 7 JSON java.lang.NoClassDefFoundError: javax/json/Json
JEE 7 JSON java.lang.NoClassDefFoundError: javax/json/Json  Hi, While using the JSON in jee 7 based application I getting following errors...(Thread.java:724) Caused by: java.lang.NoClassDefFoundError: javax/json/Json
A better Java JSON library?
A better Java JSON library?   A better Java JSON library
what is json in iphone sdk
what is json in iphone sdk  What is json in iphone sdk? Is this a library and when i need to include JSon in my iPhone SDK App
JSON main question
JSON main question  What is the main purpose of JSON ,in which cases can i use
JSON main question
JSON main question  What is the main purpose of JSON ,in which cases can i use
What is JSON?
What is JSON? In this article we are discussing about the JSON which... application. JSON- JavaScript Object Notation JavaScript Object Notation is a data... transfer from one place to another easy. Though JSON is based on Java Script
JSON-RPC       JSON-RPC-Java is a dynamic JSON-RPC implementation in Java. It allows you to transparently call server-side Java code from JavaScript with an included lightweight JSON-RPC
Version of rubygems>json dependency
List of Version of rubygems>json dependency
Version of com.tdunning>json dependency
List of Version of com.tdunning>json dependency
Version of com.twitter>json dependency
List of Version of com.twitter>json dependency
jQuery ajax json
jQuery ajax json  Hi, How to use jQuery to load json data through... to crate the json response: JSONObject obj=new JSONObject(); obj.put("name","foo..., textStatus, xhr) ] ) at client side to process the json data. Thanks
Version of com.monitorjbl>json-view dependency
List of Version of com.monitorjbl>json-view dependency
Version of ca.fuzzlesoft>json-parse dependency
List of Version of ca.fuzzlesoft>json-parse dependency
Version of com.box>json-patch dependency
List of Version of com.box>json-patch dependency
Version of com.butor>butor-json dependency
List of Version of com.butor>butor-json dependency
Version of com.cedarsoftware>json-io dependency
List of Version of com.cedarsoftware>json-io dependency
Version of com.doctusoft>json-schema-java7 dependency
List of Version of com.doctusoft>json-schema-java7 dependency
Version of com.dslplatform>dsl-json dependency
List of Version of com.dslplatform>dsl-json dependency
Version of com.floragunn>ldaptive-json dependency
List of Version of com.floragunn>ldaptive-json dependency
Version of com.gu>json-zipper-json4s_2.10 dependency
List of Version of com.gu>json-zipper-json4s_2.10 dependency


Advertisement null