inital commit
This commit is contained in:
@@ -0,0 +1,22 @@
|
||||
package com.reliancy.rec;
|
||||
|
||||
import java.io.IOException;
|
||||
|
||||
/**
|
||||
* Static methods related to JSON format.
|
||||
*/
|
||||
public class JSON {
|
||||
private JSON(){
|
||||
}
|
||||
public static final Rec reads(CharSequence seq){
|
||||
JSONDecoder dec=new JSONDecoder();
|
||||
dec.beginDocument();
|
||||
dec.parse(0, seq);
|
||||
return dec.endDocument();
|
||||
}
|
||||
public static final void writes(Rec rec,Appendable sink) throws IOException{
|
||||
JSONEncoder.encode(rec, sink);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user