Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
216a920
commit 6515d2f
Showing
7 changed files
with
147 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
package snowblossom.channels; | ||
|
||
import com.google.protobuf.util.JsonFormat; | ||
|
||
import snowblossom.channels.proto.EncryptedChannelConfig; | ||
import snowblossom.channels.proto.OfferCurrency; | ||
import snowblossom.channels.proto.Offer; | ||
|
||
|
||
public class JsonTest | ||
{ | ||
public static void main(String args[]) throws Exception | ||
{ | ||
|
||
JsonFormat.Printer printer = JsonFormat.printer(); | ||
|
||
EncryptedChannelConfig.Builder conf = EncryptedChannelConfig.newBuilder(); | ||
|
||
conf.setProtectedPath("/prot/"); | ||
|
||
Offer.Builder offer = Offer.newBuilder(); | ||
offer.setOfferMode( Offer.OfferMode.FOREVER_ACCESS ); | ||
offer.putOfferPrice("SNOW", OfferCurrency.newBuilder().setPrice(1.0).setAddress("snow:x").build()); | ||
|
||
conf.setOffer(offer.build()); | ||
|
||
System.out.println(printer.print(conf.build() )); | ||
|
||
|
||
|
||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters