A clean, Markdown-based publishing platform made for writers. Write together, and build a community. https://writefreely.org
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

9 lines
136 B

  1. package writefreely
  2. import "mime"
  3. func IsJSON(h string) bool {
  4. ct, _, _ := mime.ParseMediaType(h)
  5. return ct == "application/json"
  6. }