How can I modify the data and output a new JSON?

I had use gantt.parse(aJsonObj) to build a chart.
How can I let users modify the data (e.g. change start_time or text ) and then output a new JSON file?
Is there any chapter talk about this?

Gantt can work only on the frontend part and doesn’t have access to files.
You can only save all your data to a JSON variable then you can use that variable to save it to a file.
To save the data to a variable, you can use gantt.serialize() command:
Here is an example of how it might be implemented using Gantt API + Javascript:

It’s very helpful.

But if my tasks have many custom properties.
Can I define them in the lightbox to make some change?

For example : my data have these properties { id, text, start_date, end_date, location, color, length }
The default lightbox can work on the text and time,
but I want users can also use the lightbox to modify “location”, “color” and “length” properties.

Yes, you can modify custom properties from the lightbox.
But first, you need to decide which element type you want to use to update the value.
For example, you can use the “Select” control to display drop-down lists.
Here are two snippets where you can see how it might be implemented:
And you can check our samples with the lightbox customization: