JSON Pertanyaan dan Jawaban Wawancara
Question: How to Generate or Send JSON Data at the Server Side?Answer: • Create JSON Java object• Add name and value pairs using put method • Convert it to String type using toString method and send it to the client with content-type as "text/xml" or "text/plain" myString = new JSONObject().put("JSON", "Hello, World!").toString(); // myString is {"JSON": "Hello, World"} |
Simpan untuk Revisi
Bookmark item ini, tandai sebagai sulit, atau masukkan ke dalam set revisi.
Masuk untuk menyimpan bookmark, pertanyaan sulit, dan set revisi.
Apakah ini membantu? Ya Tidak
Most helpful rated by users:
- Who is the Father of JSON ?
- What is the file extension of JSON?
- What is JSON?
- Why use JSON over XML?
- Explain JSON with php.