Bug in DcmPersonName::writeJson

All other questions regarding DCMTK

Moderator: Moderator Team

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

Bug in DcmPersonName::writeJson

#1 Post by Shaeto » Wed, 2020-08-05, 10:59

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: 1813
Joined: Fri, 2004-11-05, 13:47
Location: Oldenburg, Germany
Contact:

Re: Bug in DcmPersonName::writeJson

#2 Post by Michael Onken » Thu, 2020-08-06, 08:30

Hi Shaeto,

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

Best regards,
Michael

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

Re: Bug in DcmPersonName::writeJson

#3 Post by Shaeto » Thu, 2020-08-06, 11:23

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: 2291
Joined: Tue, 2011-05-03, 14:38
Location: Oldenburg, Germany
Contact:

Re: Bug in DcmPersonName::writeJson

#4 Post by J. Riesmeier » Thu, 2020-08-06, 12:54

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: 140
Joined: Tue, 2009-01-20, 17:50
Location: CA, USA
Contact:

Re: Bug in DcmPersonName::writeJson

#5 Post by Shaeto » Thu, 2020-08-06, 14:29

Yes i meant the native model (dcm2xml -nat)

Post Reply

Who is online

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