Bug in DcmPersonName::writeJson

All other questions regarding DCMTK

Moderator: Moderator Team

Post Reply
Message
Author
Shaeto
Posts: 147
Joined: Tue, 2009-01-20, 17:50
Location: CA, USA
Contact:

Bug in DcmPersonName::writeJson

#1 Post by Shaeto »

method DcmPersonName::writeJson outputs incorrectly encoded data to the json document

"Lexer" helper class does not encode characters and produces invalid json if patient name contains for example " (quotation mark)

imho Lexer::writeComponent must call something like DcmJsonFormat::printValueString

Michael Onken
DCMTK Developer
Posts: 2049
Joined: Fri, 2004-11-05, 13:47
Location: Oldenburg, Germany
Contact:

Re: Bug in DcmPersonName::writeJson

#2 Post by Michael Onken »

Hi Shaeto,

thank you for the report, I added an entry to the bug tracker for now.

Best regards,
Michael

Shaeto
Posts: 147
Joined: Tue, 2009-01-20, 17:50
Location: CA, USA
Contact:

Re: Bug in DcmPersonName::writeJson

#3 Post by Shaeto »

Thank you Michael,

I see the same problem in DcmPersonName::writeXML method, the writer does not encode components of the patient name

J. Riesmeier
DCMTK Developer
Posts: 2503
Joined: Tue, 2011-05-03, 14:38
Location: Oldenburg, Germany
Contact:

Re: Bug in DcmPersonName::writeJson

#4 Post by J. Riesmeier »

Are you talking about the output in Native DICOM Model? The DCMTK-specific XML output format does not show this issue:

Code: Select all

<element tag="0010,0010" vr="PN" vm="1" len="16" name="PatientName">Riesmeier^J&quot;org</element>

Shaeto
Posts: 147
Joined: Tue, 2009-01-20, 17:50
Location: CA, USA
Contact:

Re: Bug in DcmPersonName::writeJson

#5 Post by Shaeto »

Yes i meant the native model (dcm2xml -nat)

Post Reply

Who is online

Users browsing this forum: Bing [Bot], Google [Bot] and 1 guest