Json support for twirl #13175
                  
                    
                      onouguier-ledger
                    
                  
                
                  started this conversation in
                Ideas
              
            Replies: 1 comment
-
        
 Twirl does not come with json support (   def defaultFormats =
    Map(
      "html" -> "play.twirl.api.HtmlFormat",
      "txt"  -> "play.twirl.api.TxtFormat",
      "xml"  -> "play.twirl.api.XmlFormat",
      "js"   -> "play.twirl.api.JavaScriptFormat"
    )You can however add custom formats, it's quite easy: 
 
 Why not? If you send a pull request to https://github.com/playframework/twirl I am happy to take a look. You can start by looking how xml format is implemented, it shouldn't be too hard. Just take care that escaping is handled correctly. Thanks!  | 
  
Beta Was this translation helpful? Give feedback.
                  
                    0 replies
                  
                
            
  
    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.
-
AFAIU,
The support for JSON output is missing in Twirl.
Can I to implement it as core feature ?
Thx
Beta Was this translation helpful? Give feedback.
All reactions