We use this library in a network program.There is a situation we have to overcome. #2464
-
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.
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.
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.