I want to deploy argument with name, principal and json data ,but I don’t know how to deal with json data,what should i do?
dfx deploy --argument=‘(“carbondoc #123”, principal “at3u2-nfbmw-764d7-bdv3t-6u53y-kdaro-5y4bu-fvjr6-3nixt-25y6p-hae”,“”)’
The picture is my motoko backend.
Hey, Here is an example of how you should do it in your case
dfx deploy --argument "(
name = \"Value\",
owner = principal \"at3u2-nfbmw-764d7-bdv3t-6u53y-kdaro-5y4bu-fvjr6-3nixt-25y6p-hae\",
)"
Thanks for ansering me,but what about my json?
json data:
影印設備1 0.002777777777777778 0 1 0.002777777777777778 0 0 0 0 0
影印設備2 0.001388888888888889 0.001388888888888889 1 0 0 0.001388888888888889 0 0 0
影印設備3 0.001388888888888889 0.001388888888888889 0.5 0 0 0.001388888888888889 0 0 0
燈光設備1 0.001388888888888889 0.001388888888888889 0.5 0 0 0.001388888888888889 0 0 0
燈光設備2 0.001388888888888889 0.001388888888888889 0.5 0 0 0.001388888888888889 0 0 0
燈光設備3 0.001388888888888889 0.001388888888888889 0.5 0 0 0.001388888888888889 0 0 0
電腦設備1 0.001388888888888889 0.001388888888888889 0.5 0 0 0.001388888888888889 0 0 0
電腦設備2 0.001388888888888889 0.001388888888888889 0.5 0 0 0.001388888888888889 0 0 0
電腦設備3 0.001388888888888889 0.001388888888888889 0.5 0 0 0.001388888888888889 0 0 0
電腦設備4 0.001388888888888889 0.001388888888888889 0.5 0 0 0.001388888888888889 0 0 0
電腦設備5 0.001388888888888889 0.001388888888888889 0.5 0 0 0.001388888888888889 0 0 0
水排放(m₃) 0
影印設備1紙張張數 2
影印設備2紙張張數 2
影印設備3紙張張數 2

Not only you need to have defined data types for all parts of your code, but also json is not a data type that you cam use in motoko.
In order to solve your problem try to break your json into smaller types and then once you have that type structure in place, send it here so i can help you further
Thanks for sharing your solution, when I change to a smaller data type, it works!!!