JSON вопросы и ответы для интервью
Question: How to Generate or Send JSON Data at the Server Side?Answer: Create JSON Java objectAdd 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"} |
Сохранить для повторения
Добавьте этот элемент в закладки, отметьте как сложный или поместите в набор для повторения.
Войдите, чтобы сохранять закладки, сложные вопросы и наборы для повторения.
Это полезно? Да Нет
Самое полезное по оценкам пользователей:
- 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.