diff --git a/CHANGES.txt b/CHANGES.txt
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,5 +1,7 @@
 Changelog for HLint
 
+1.9.40
+    #293, fix the JSON format of the output
 1.9.39
     #287, don't incorrectly suggest newtype
 1.9.38
diff --git a/LICENSE b/LICENSE
--- a/LICENSE
+++ b/LICENSE
@@ -1,4 +1,4 @@
-Copyright Neil Mitchell 2006-2016.
+Copyright Neil Mitchell 2006-2017.
 All rights reserved.
 
 Redistribution and use in source and binary forms, with or without
diff --git a/hlint.cabal b/hlint.cabal
--- a/hlint.cabal
+++ b/hlint.cabal
@@ -1,13 +1,13 @@
 cabal-version:      >= 1.18
 build-type:         Simple
 name:               hlint
-version:            1.9.39
+version:            1.9.40
 license:            BSD3
 license-file:       LICENSE
 category:           Development
 author:             Neil Mitchell <ndmitchell@gmail.com>
 maintainer:         Neil Mitchell <ndmitchell@gmail.com>
-copyright:          Neil Mitchell 2006-2016
+copyright:          Neil Mitchell 2006-2017
 synopsis:           Source code suggestions
 description:
     HLint gives suggestions on how to improve your source code.
@@ -37,10 +37,12 @@
 
 flag threaded
     default: True
+    manual: True
     description: Build with support for multithreaded execution
 
 flag gpl
     default: True
+    manual: True
     description: Use GPL libraries, specifically hscolour
 
 library
diff --git a/src/HLint.hs b/src/HLint.hs
--- a/src/HLint.hs
+++ b/src/HLint.hs
@@ -130,18 +130,18 @@
     settings <- readAllSettings cmd flags
     ideas <- getIdeas cmd settings flags
     let (showideas,hideideas) = partition (\i -> cmdShowAll || ideaSeverity i /= Ignore) ideas
-    if cmdJson
-        then putStrLn . showIdeasJson $ showideas
-        else if cmdSerialise then do
-          hSetBuffering stdout NoBuffering
-          print $ map (show &&& ideaRefactoring) showideas
-        else if cmdRefactor then
-          handleRefactoring showideas cmdFiles cmd
-        else do
-            usecolour <- cmdUseColour cmd
-            showItem <- if usecolour then showANSI else return show
-            mapM_ (outStrLn . showItem) showideas
-            handleReporting showideas hideideas cmd
+    if cmdJson then
+        putStrLn $ showIdeasJson showideas
+     else if cmdSerialise then do
+        hSetBuffering stdout NoBuffering
+        print $ map (show &&& ideaRefactoring) showideas
+     else if cmdRefactor then
+        handleRefactoring showideas cmdFiles cmd
+     else do
+        usecolour <- cmdUseColour cmd
+        showItem <- if usecolour then showANSI else return show
+        mapM_ (outStrLn . showItem) showideas
+        handleReporting showideas hideideas cmd
     return showideas
 
 getIdeas :: Cmd -> [Setting] -> ParseFlags -> IO [Idea]
diff --git a/src/Idea.hs b/src/Idea.hs
--- a/src/Idea.hs
+++ b/src/Idea.hs
@@ -3,6 +3,8 @@
 module Idea(module Idea, Note(..), showNotes, Severity(..)) where
 
 import Data.List.Extra
+import Data.Char
+import Numeric
 import HSE.All
 import Settings
 import HsColour
@@ -26,21 +28,27 @@
 
 showIdeaJson :: Idea -> String
 showIdeaJson idea@Idea{ideaSpan=srcSpan@SrcSpan{..}, ..} = wrap . intercalate "," . map mkPair $
-    [("module", show ideaModule)
-    ,("decl", show ideaDecl)
-    ,("severity", show . show $ ideaSeverity)
-    ,("hint", show ideaHint)
-    ,("file", show srcSpanFilename)
+    [("module", str ideaModule)
+    ,("decl", str ideaDecl)
+    ,("severity", str $ show ideaSeverity)
+    ,("hint", str ideaHint)
+    ,("file", str srcSpanFilename)
     ,("startLine", show srcSpanStartLine)
     ,("startColumn", show srcSpanStartColumn)
     ,("endLine", show srcSpanEndLine)
     ,("endColumn", show srcSpanEndColumn)
-    ,("from", show ideaFrom)
-    ,("to", maybe "null" show ideaTo)
-    ,("note", show $ map (show . show) ideaNote)
-    ,("refactorings", show . show $ ideaRefactoring)
+    ,("from", str ideaFrom)
+    ,("to", maybe "null" str ideaTo)
+    ,("note", show $ map (str . show) ideaNote)
+    ,("refactorings", str $ show ideaRefactoring)
     ]
   where
+    str x = "\"" ++ concatMap f x ++ "\""
+        where f '\"' = "\\\""
+              f '\\' = "\\\\"
+              f '\n' = "\\n"
+              f x | not $ isAscii x = "\\u" ++ takeEnd 4 ("0000" ++ showHex (ord x) "")
+              f x = [x]
     mkPair (k, v) = show k ++ ":" ++ v
     wrap x = "{" ++ x ++ "}"
 
