Hi Liqiang Wang,
I assume, you will be saving the data in some persistable entity. In that case, on click of action button you can create objects of non-persistable entity (as defined above) and set the values along with required association(s). Finally, call Export with Mapping to export the JSON object.
Hope this helps!