Package org.commonjava.maven.ext.io
Class JSONIO
- java.lang.Object
-
- org.commonjava.maven.ext.io.JSONIO
-
@Named @Singleton public class JSONIO extends Object
-
-
Constructor Summary
Constructors Constructor Description JSONIO()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static JsonEncoding
detectEncoding(File jsonFile)
String
detectEOL(File jsonFile)
Charset
getCharset()
JsonEncoding
getEncoding()
String
getEOL()
DocumentContext
parseJSON(File jsonFile)
void
writeJSON(File target, DocumentContext contents)
-
-
-
Method Detail
-
detectEncoding
public static JsonEncoding detectEncoding(File jsonFile) throws org.commonjava.maven.ext.common.ManipulationException
- Throws:
org.commonjava.maven.ext.common.ManipulationException
-
getEncoding
public JsonEncoding getEncoding() throws org.commonjava.maven.ext.common.ManipulationException
- Throws:
org.commonjava.maven.ext.common.ManipulationException
-
getCharset
public Charset getCharset() throws org.commonjava.maven.ext.common.ManipulationException
- Throws:
org.commonjava.maven.ext.common.ManipulationException
-
detectEOL
public String detectEOL(File jsonFile) throws org.commonjava.maven.ext.common.ManipulationException
- Throws:
org.commonjava.maven.ext.common.ManipulationException
-
getEOL
public String getEOL() throws org.commonjava.maven.ext.common.ManipulationException
- Throws:
org.commonjava.maven.ext.common.ManipulationException
-
parseJSON
public DocumentContext parseJSON(File jsonFile) throws org.commonjava.maven.ext.common.ManipulationException
- Throws:
org.commonjava.maven.ext.common.ManipulationException
-
writeJSON
public void writeJSON(File target, DocumentContext contents) throws org.commonjava.maven.ext.common.ManipulationException
- Throws:
org.commonjava.maven.ext.common.ManipulationException
-
-