Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 2 of 2 for JsonUtil (0.1 sec)

  1. src/main/java/org/codelibs/core/text/JsonUtil.java

     */
    package org.codelibs.core.text;
    
    /**
     * JSON utilities.
     *
     * @author shinsuke
     *
     */
    public class JsonUtil {
    
        /**
         * Defualt constructor.
         */
        protected JsonUtil() {
        }
    
        /**
         * Escapes a value as Json string.
         *
         * @param value input
         * @return escaped string.
         */
    Registered: Fri Nov 01 20:58:10 UTC 2024
    - Last Modified: Thu Mar 07 01:59:08 UTC 2024
    - 2.3K bytes
    - Viewed (0)
  2. src/test/java/org/codelibs/core/text/JsonUtilTest.java

    import org.junit.Test;
    
    /**
     * @author shinsuke
     *
     */
    public class JsonUtilTest {
        @Test
        public void escape() {
            assertThat(JsonUtil.escape("abc123あア亜"), is("abc123あア亜"));
            assertThat(JsonUtil.escape("\\\"/\b\t\n\f\r\0"), is("\\\\\\\"\\/\\b\\t\\n\\f\\r\\u0000"));
        }
    Registered: Fri Nov 01 20:58:10 UTC 2024
    - Last Modified: Thu Mar 07 01:59:08 UTC 2024
    - 1K bytes
    - Viewed (0)
Back to top