Click here to Skip to main content
14,669,432 members
Home » Discussions » C#
   

C#

 
AnswerRe: Task.Run.Wait Pin
jsc423-Jul-20 6:31
professionaljsc423-Jul-20 6:31 
QuestionStrange characters in JSON RPC server response Pin
pkfox1-Jul-20 3:37
professionalpkfox1-Jul-20 3:37 
AnswerRe: Strange characters in JSON RPC server response Pin
Luc Pattyn1-Jul-20 5:33
sitebuilderLuc Pattyn1-Jul-20 5:33 
GeneralRe: Strange characters in JSON RPC server response Pin
pkfox1-Jul-20 6:23
professionalpkfox1-Jul-20 6:23 
GeneralRe: Strange characters in JSON RPC server response Pin
pkfox1-Jul-20 6:46
professionalpkfox1-Jul-20 6:46 
GeneralRe: Strange characters in JSON RPC server response Pin
Luc Pattyn1-Jul-20 9:36
sitebuilderLuc Pattyn1-Jul-20 9:36 
GeneralRe: Strange characters in JSON RPC server response Pin
pkfox1-Jul-20 10:40
professionalpkfox1-Jul-20 10:40 
GeneralRe: Strange characters in JSON RPC server response Pin
Luc Pattyn5-Jul-20 3:27
sitebuilderLuc Pattyn5-Jul-20 3:27 
You're welcome.

Two comments though:

1. you completely replaced the content of this message; I got an e-mail when you first created it. And obviously not when you replaced all of it, so it took a while before I accidentally noticed the new content. You should not replace/delete messages on CodeProject, you can create new ones, or add to or slightly edit existing ones.

2. your code is fine with the current data. It has a few weaknesses in general: it assumes field names are always 4 chars (see constants 4 and 5), and it locates field names by a string search, which could go wrong when one field name happens to appear as (part of) another field's value.

The universal way to handle this would be to scan the entire line and build a Dictionary<string,string> holding all the key-value pairs in the line; that too would rely on some restrictions on field names and/or values (e.g. field names are uppercase letters only, and field value lengths must be less than 'A').


Cheers
Luc Pattyn [My Articles] Nil Volentibus Arduum


modified 5-Jul-20 9:45am.

GeneralRe: Strange characters in JSON RPC server response Pin
pkfox5-Jul-20 5:45
professionalpkfox5-Jul-20 5:45 
GeneralRe: Strange characters in JSON RPC server response Pin
Luc Pattyn5-Jul-20 6:19
sitebuilderLuc Pattyn5-Jul-20 6:19 
GeneralRe: Strange characters in JSON RPC server response Pin
pkfox5-Jul-20 22:15
professionalpkfox5-Jul-20 22:15 
GeneralRe: Strange characters in JSON RPC server response Pin
Luc Pattyn6-Jul-20 2:12
sitebuilderLuc Pattyn6-Jul-20 2:12 
GeneralRe: Strange characters in JSON RPC server response Pin
pkfox6-Jul-20 3:08
professionalpkfox6-Jul-20 3:08 
GeneralRe: Strange characters in JSON RPC server response Pin
Luc Pattyn6-Jul-20 3:23
sitebuilderLuc Pattyn6-Jul-20 3:23 
GeneralRe: Strange characters in JSON RPC server response Pin
Luc Pattyn6-Jul-20 6:14
sitebuilderLuc Pattyn6-Jul-20 6:14 
GeneralRe: Strange characters in JSON RPC server response Pin
pkfox6-Jul-20 6:56
professionalpkfox6-Jul-20 6:56 
GeneralRe: Strange characters in JSON RPC server response Pin
Luc Pattyn6-Jul-20 7:16
sitebuilderLuc Pattyn6-Jul-20 7:16 
GeneralRe: Strange characters in JSON RPC server response Pin
pkfox6-Jul-20 7:27
professionalpkfox6-Jul-20 7:27 
GeneralRe: Strange characters in JSON RPC server response Pin
Luc Pattyn6-Jul-20 7:43
sitebuilderLuc Pattyn6-Jul-20 7:43 
GeneralRe: Strange characters in JSON RPC server response Pin
pkfox6-Jul-20 8:05
professionalpkfox6-Jul-20 8:05 
QuestionIntegers to Float IEEE 754 Pin
Member 1487212830-Jun-20 16:39
MemberMember 1487212830-Jun-20 16:39 
AnswerRe: Integers to Float IEEE 754 Pin
Luc Pattyn30-Jun-20 17:29
sitebuilderLuc Pattyn30-Jun-20 17:29 
GeneralRe: Integers to Float IEEE 754 Pin
Member 148721281-Jul-20 5:44
MemberMember 148721281-Jul-20 5:44 
GeneralRe: Integers to Float IEEE 754 Pin
Luc Pattyn1-Jul-20 5:50
sitebuilderLuc Pattyn1-Jul-20 5:50 
GeneralRe: Integers to Float IEEE 754 Pin
Member 148721281-Jul-20 6:08
MemberMember 148721281-Jul-20 6:08 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.