public static void main(String[] args) {

        try {

            ObjectMapper objectMapper = new ObjectMapper();

            Map<String,String> map = new HashMap<String,String>();

            map.put("name", "sergii");

            String json = objectMapper.writeValueAsString(map);

            System.out.println(json);
        } catch (Exception e) {
            e.printStackTrace();
        }

    }