Hyperledger Fabric How to initialise a 2D array in cto file

0 votes

I want to initialise a 2D array in a Hyperledger .cto file

I want to do something like:

o String[][] csv optional

But the above statement doesnt work, it shows error. Any other way to do this?

Oct 30, 2018 in Blockchain by digger
• 26,740 points
715 views

1 answer to this question.

0 votes

You could try something like this, with a concept:

concept S1 {
  o String[] csv
}

asset S2 identified by sID {
  o String sID
  o S1 [] s1 
}

Example data would look like:

{
  "$class": "org.acme.model.S2",
  "sID": "SR26",
  "s1": [{"csv":["a","b"]},{"csv":["c","d"]}]
}
answered Oct 30, 2018 by Omkar
• 69,220 points

Related Questions In Blockchain

0 votes
1 answer
+1 vote
2 answers

How to return value from a chaincode in Hyperledger Fabric?

Hyperledger Fabric supports only 2 types of ...READ MORE

answered Jun 13, 2018 in Blockchain by Perry
• 17,100 points
3,002 views
0 votes
1 answer

How to join a peer to a channel in Hyperledger Fabric?

When you run the command: peer channel create ...READ MORE

answered Jul 31, 2018 in Blockchain by digger
• 26,740 points
2,108 views
0 votes
1 answer

How to register a user in Hyperledger Fabric?

Best practice would be to leverage an ...READ MORE

answered Sep 5, 2018 in Blockchain by Christine
• 15,790 points
1,879 views
0 votes
1 answer

Hyperledger Sawtooth vs Quorum in concurrency and speed Ask

Summary: Both should provide similar reliability of ...READ MORE

answered Sep 26, 2018 in IoT (Internet of Things) by Upasana
• 8,620 points
1,470 views
0 votes
1 answer

Invalid Batch or signature in Savtooth

This will solve your problem import org.apache.commons.codec.binary.Hex; Transaction txn ...READ MORE

answered Aug 1, 2018 in Blockchain by digger
• 26,740 points
1,037 views
+1 vote
1 answer
0 votes
1 answer

How to control a malicious user in hyperledger fabric?

Fabric is an implementation of blockchain. Blockchain ...READ MORE

answered Jun 29, 2018 in Blockchain by Omkar
• 69,220 points
1,087 views
+15 votes
5 answers
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP