Line feeds display in description field through API

Hi,

Does anyone know how I can enter/display a line feed in a description field for data elements?

Have imported descriptions from Excel and line feeds are displaying ok upon edit in the meta data app (v2.22) but when called through the API (and when ‘showing detail’ in meta data app) the line feeds do not display.

Hope someone able to help.

Many thanks

Craig

J

Hi Craig,

JSON does not support real line breaks, you would have to replace it with \n or \r\n .

We can fix this at some point, but its not high on the list right now :wink:

regards,

Lars

···

On Wed, Jun 22, 2016 at 2:39 PM, Craig Hollingsworth craig.hollingsworth@nrc.no wrote:

Hi,

Does anyone know how I can enter/display a line feed in a description field for data elements?

Have imported descriptions from Excel and line feeds are displaying ok upon edit in the meta data app (v2.22) but when called through the API (and when ‘showing detail’ in meta data app) the line feeds do not display.

Hope someone able to help.

Many thanks

Craig

J


Mailing list: https://launchpad.net/~dhis2-users

Post to : dhis2-users@lists.launchpad.net

Unsubscribe : https://launchpad.net/~dhis2-users

More help : https://help.launchpad.net/ListHelp

Lars Helge Øverland

Lead developer, DHIS 2

University of Oslo

Skype: larshelgeoverland

lars@dhis2.org

http://www.dhis2.org