Github user newkek commented on the issue:

    https://github.com/apache/tinkerpop/pull/351
  
    @spmallette yes, maybe some code will help explain.
    
    ```
            ObjectMapper mapper = 
GraphSONMapper.build().version(GraphSONVersion.V2_0).typeInfo(GraphSONMapper.TypeInfo.PARTIAL_TYPES).create().createMapper();
            Map<String, Integer> map = new HashMap<>();
            map.put("helo", 2);
    
    
            String s = mapper.writeValueAsString(map);
    
            // prints 's = {"helo":2}'
            System.out.println("s = " + s);
    
            Map read = mapper.readValue(s, Map.class);
    
            // prints 'read.get("helo") = class java.lang.Integer'
            System.out.println("read.get(\"helo\") = " + 
read.get("helo").getClass());
    
            Map<String, Long> map3 = new HashMap<>();
            map3.put("helo", 2L);
    
    
            String s2 = mapper.writeValueAsString(map3);
    
            // prints 's2 = {"helo":[{"@class":"Long"},2]}'
            System.out.println("s2 = " + s2);
    
            Map read2 = mapper.readValue(s2, Map.class);
    
            // prints 'read2.get("helo") = class java.lang.Long'
            System.out.println("read2.get(\"helo\") = " + 
read2.get("helo").getClass());
    ```
    
    > number with decimal and no type = Java Float
    
    Almost, by default decimals are Double, not Floats.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

Reply via email to