yjshen commented on issue #6213: [Client] JSONSchema not able to encode message 
in case class (scala)
URL: https://github.com/apache/pulsar/issues/6213#issuecomment-585208764
 
 
   To use Scala case class as POJO, you should write like this:
   
   ```scala
     case class Foo(@BeanProperty i: Int, @BeanProperty f: Float, @BeanProperty 
bar: Bar)
     case class Bar(@BeanProperty b: Boolean, @BeanProperty s: String)
   
     case class F1(@BeanProperty baz: Baz)
   
     case class Baz(
         @BeanProperty f: Float,
         @BeanProperty d: Double,
         @BeanProperty mp: util.Map[String, Bar],
         @BeanProperty arr: Array[Bar])
   ```

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to