boonproject / boon

Simple opinionated Java for the novice to expert level Java Programmer. Low Ceremony. High Productivity.
http://richardhightower.github.io/site/Boon/Welcome.html
Apache License 2.0
520 stars 102 forks source link

getting org.boon.json.JsonException #330

Closed chandrapersonal closed 9 years ago

chandrapersonal commented 9 years ago

in ETCDclient.java when method parseResponse when string Json parameter is "" empty

Getting the below error:

org.boon.json.JsonException: Unable to determine the current character, it is not a string, number, array, or object

The current character read is '}' with an int value of 125 Unable to determine the current character, it is not a string, number, array, or object line number 1 index number 0

^ at org.boon.json.implementation.JsonParserCharArray.complain(JsonParserCharArray.java:193) at org.boon.json.implementation.JsonFastParser.decodeValueOverlay(JsonFastParser.java:174) at org.boon.json.implementation.JsonFastParser.parse(JsonFastParser.java:328) at org.boon.json.implementation.BaseJsonParser.parse(BaseJsonParser.java:127) at org.boon.json.implementation.BaseJsonParserAndMapper.parse(BaseJsonParserAndMapper.java:765) at org.boon.json.implementation.BaseJsonParserAndMapper.parse(BaseJsonParserAndMapper.java:194) at org.boon.json.JsonMappingParser.parse(JsonMappingParser.java:199) at org.boon.etcd.EtcdClient.parseResponse(EtcdClient.java:785) at org.boon.etcd.EtcdClient.access$400(EtcdClient.java:65) at org.boon.etcd.EtcdClient$6$2.handle(EtcdClient.java:744) at org.boon.etcd.EtcdClient$6$2.handle(EtcdClient.java:740) at org.vertx.java.core.http.impl.DefaultHttpClientResponse.handleEnd(DefaultHttpClientResponse.java:203) at org.vertx.java.core.http.impl.ClientConnection.handleResponseEnd(ClientConnection.java:347) at org.vertx.java.core.http.impl.DefaultHttpClient$ClientHandler.doMessageReceived(DefaultHttpClient.java:860) at org.vertx.java.core.http.impl.DefaultHttpClient$ClientHandler.doMessageReceived(DefaultHttpClient.java:830) at org.vertx.java.core.http.impl.VertxHttpHandler.channelRead(VertxHttpHandler.java:72) at org.vertx.java.core.net.impl.VertxHandler.channelRead(VertxHandler.java:155) at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:332) at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:318) at io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:163) at io.netty.channel.CombinedChannelDuplexHandler.channelRead(CombinedChannelDuplexHandler.java:148) at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:332) at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:318) at io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:787) at io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:125) at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:507) at io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:464) at io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:378) at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:350) at io.netty.util.concurrent.SingleThreadEventExecutor$2.run(SingleThreadEventExecutor.java:116) at java.lang.Thread.run(Thread.java:745)

jsonFastParser methos is __currentChar=}

chandrapersonal commented 9 years ago

got it. etcd server is returning empty STRING instead of empty JSON