Java URI Decode decodeURItoMap(String URIstring)

Here you can find the source of decodeURItoMap(String URIstring)

Description

decode UR Ito Map

License

Open Source License

Declaration

public static Map<String, Object> decodeURItoMap(String URIstring) 

Method Source Code

//package com.java2s;
//License from project: Open Source License 

import java.util.HashMap;

import java.util.Map;

import com.fasterxml.jackson.core.type.TypeReference;
import com.fasterxml.jackson.databind.ObjectMapper;

public class Main {
    public static Map<String, Object> decodeURItoMap(String URIstring) {
        HashMap<String, Object> map = new HashMap<String, Object>();
        try {//from   ww w  . ja  v a 2s  .c om
            URIstring = java.net.URLDecoder.decode(URIstring, "UTF-8");
            ObjectMapper mapper = new ObjectMapper();
            map = mapper.readValue(URIstring, new TypeReference<Map<String, Object>>() {
            });
        } catch (Exception e) {
        }
        return map;
    }
}

Related

  1. decodeURI(String str, boolean fullUri)
  2. decodeUri(String string)
  3. decodeURI(String uri)
  4. decodeURI(URI uri)
  5. decodeURIComponent(String s, String charset)
  6. uriDecode(String encoded)
  7. uriDecodePath(String path)
  8. uriDecoding(String str)