mirror of
https://github.com/AsamK/signal-cli
synced 2025-08-30 02:50:39 +00:00
Implement jsonRpc command
Co-authored-by: technillogue <technillogue@gmail.com> Closes #668
This commit is contained in:
parent
6c00054407
commit
a8bbdb54d0
20 changed files with 863 additions and 31 deletions
|
@ -1,11 +1,10 @@
|
|||
package org.asamk.signal;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonAutoDetect;
|
||||
import com.fasterxml.jackson.annotation.PropertyAccessor;
|
||||
import com.fasterxml.jackson.core.JsonGenerator;
|
||||
import com.fasterxml.jackson.core.JsonProcessingException;
|
||||
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||
|
||||
import org.asamk.signal.util.Util;
|
||||
|
||||
import java.io.BufferedWriter;
|
||||
import java.io.IOException;
|
||||
import java.io.OutputStream;
|
||||
|
@ -21,9 +20,7 @@ public class JsonWriterImpl implements JsonWriter {
|
|||
public JsonWriterImpl(final OutputStream outputStream) {
|
||||
this.writer = new BufferedWriter(new OutputStreamWriter(outputStream, StandardCharsets.UTF_8));
|
||||
|
||||
objectMapper = new ObjectMapper();
|
||||
objectMapper.setVisibility(PropertyAccessor.ALL, JsonAutoDetect.Visibility.PUBLIC_ONLY);
|
||||
objectMapper.disable(JsonGenerator.Feature.AUTO_CLOSE_TARGET);
|
||||
objectMapper = Util.createJsonObjectMapper();
|
||||
}
|
||||
|
||||
public synchronized void write(final Object object) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue