senayuki commented on issue #3212:
URL: https://github.com/apache/camel-k/issues/3212#issuecomment-1100011139

   > Also Jackson is a thing, Fastjson is another thing.
   
   > Also Jackson is a thing, Fastjson is another thing.
   
   There is another question that puzzles me. I can define a custom serializer 
module for Jackson in normal Java( just like moduleClassNames, JavaTimeModule  
below), but if I use yaml file, do I have any way to use my class without 
deploy my jar to maven? Just define a class in yaml, and use it, Is this 
impossible?
   ```
         - marshal:
             json:
               moduleClassNames: 
"com.fasterxml.jackson.datatype.jsr310.JavaTimeModule"
               disableFeatures: "WRITE_DATES_AS_TIMESTAMPS"
   ```
   The class I want like this
   ```java
   public class TimeSerializer extends SimpleModule {
       public TimeSerializer(){
           super(PackageVersion.VERSION);
           addSerializer(LocalDateTime.class, new LocalDateTimeSerializer());
       }
   }
   ```
   What I want to do is let Jackson serialize LocalDateTime into UNIX 
timestamp, and Jackson gave me an array, which shocked me, so I'm working with 
the serializer battle
   
   I'm really confused about the yaml writing method of camel K. instead of 
seeking automatic conversion, I think the introduction of yaml in camel-k 
tutorial is too simple and lacks advanced usage
   
   Sorry, my question is beyond the scope of this issues, but this problem 
really bothers me. If you know, please tell me possible or impossible or 
don't-know, so I won't try again. Thank you


-- 
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]

Reply via email to