We use this library in a network program.There is a situation we have to overcome. #2464
Answered
by
gregmarr
helloword010
asked this question in
Q&A
-
we are a server and receive the json string from another server. it is not a complete json string we received one time,but it is Orderly .that means we have to receive serval times and we have to make sure it is a full json. now we have use exception to make sure it is a full json. i don't think it is a good way.Is there a better way? |
Beta Was this translation helpful? Give feedback.
Answered by
gregmarr
Nov 9, 2020
Replies: 1 comment
-
You can use this function to check before parsing, but then you basically have to parse every message at least twice. Depending on why you are trying to avoid exceptions, that may be an acceptable trade-off.
|
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
helloword010
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
You can use this function to check before parsing, but then you basically have to parse every message at least twice. Depending on why you are trying to avoid exceptions, that may be an acceptable trade-off.