jeffreytkj opened a new issue, #1818:
URL: https://github.com/apache/fury/issues/1818

   ### Search before asking
   
   - [X] I had searched in the [issues](https://github.com/apache/fury/issues) 
and found no similar issues.
   
   
   ### Version
   
   0.7.0
   
   ### Component(s)
   
   Java
   
   ### Minimal reproduce step
   
   ```
   class Test {
       var id: Long? = null
       var map: MutableMap<String, Any?>
   
       constructor(map: Map<String, Any?>) {
           val camelCaseMap = mutableMapOf<String, Any?>()
           for ((k, v) in map) {
               // Change to camel case
               val prop = toCamelCase(k)
               camelCaseMap[prop] = v
           }
           this.map = camelCaseMap.withDefault { null }
       }
   
       fun toCamelCase(name: String): String {
           if (name.isEmpty()) {
               return ""
           }
           var camelCase = name.substring(0, 1).toLowerCase()
   
           if (name.length > 1) {
               var wordStart = false;
   
               for (i in 1..(name.length - 1)) {
                   var currChar = name[i]
                   if (currChar == '_') {
                       wordStart = true
                   } else {
                       if (wordStart) {
                           camelCase += currChar.toUpperCase()
                       } else {
                           camelCase += currChar.toLowerCase()
                       }
                       wordStart = false
                   }
               }
           }
           return camelCase
       }
   }
   
   fun main(args: Array<String>) {
       println("Hello World!")
   
       // Try adding program arguments via Run/Debug configuration.
       // Learn more about running applications: 
https://www.jetbrains.com/help/idea/running-applications.html.
       println("Program arguments: ${args.joinToString()}")
       val fury = Fury.builder().build()
       fury.register(Test::class.java)
       val bytes = fury.serialize(Test(mapOf("id" to "123")))
       println(fury.deserialize(bytes))
   }
   ```
   
   
   ### What did you expect to see?
   
   Able to serialize Test object and deserialize it to see the values of the 
properties
   
   ### What did you see instead?
   
   ![image 
(5)](https://github.com/user-attachments/assets/f8c0de71-3ac7-4406-9458-ffcfdb3d8f00)
   
   
   ### Anything Else?
   
   _No response_
   
   ### Are you willing to submit a PR?
   
   - [ ] I'm willing to submit a PR!


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to