BasicType registrations for generic JSON types #7179
                  
                    
                      beikov
                    
                  
                
                  started this conversation in
                Design Proposals
              
            Replies: 0 comments
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment
  
        
    
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Add
BasicTyperegistrations for some generic JSON types:com.fasterxml.jackson.databind.JsonNodejakarta.json.JsonValueWe would only add these type registrations when the respective JSON library is available on the classpath. The main motivation for this is to allow easy access to JSON data for native queries. People can then use e.g.
NativeQuery.addScalar(..., JsonObject.class)to retrieve a Json parsed value directly.A possible alternative to this could be that we add
addScalaroverloads that additionally accept aSqlTypescode, which would allow us to resolve the properJdbcTypeand construct the correctBasicType. This solution would be more flexible and future proof.Related to the discussion is the JPA feature request: jakartaee/persistence#343
Thoughts?
Beta Was this translation helpful? Give feedback.
All reactions