can I update node content with json content instead of text

cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Member II

can I update node content with json content instead of text

Hello everyone,

I'm working on an Angular 4 application using ADF for Alfresco. In this application, I want to save the JSON structure of a form in File Content. I'm trying to use the updateNodeContent API but this only require a text content ...

How can I send my JSON as a File Content ?

Thank you in advance for your help ! 

Note (by Axel Faust‌): This has also been double-posted in the French language section.

1 Reply
Highlighted
Alfresco Employee

Re: can I update node content with json content instead of text

You can use the standard "JSON.stringify" and "JSON.parse" functions to convert your json from and to string: JSON.stringify() - JavaScript | MDN