PersonTheCat

HjsonComments test input

Jan 1st, 2019
173
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.38 KB | None | 0 0
  1. # Headers placed in this location will now be
  2. # correctly saved by hjson-java!
  3. {
  4. # Comments can be placed above values.
  5. numPenguins: 417 # And beside values.
  6. // Multiple comment styles are supported.
  7. anotherNum: 24
  8. randString: "info", # Even with quotes and commas.
  9. /*
  10. There's a lot of info here.
  11. Here's another line.
  12. And another line.
  13. */
  14. complicatedObject: {
  15. apples: 12
  16. bananas: 14
  17. }
  18. # Objects and arrays placed on a single line are
  19. # considered "compact" and will remain that way.
  20. arrayOfNums: [ 1, 2, 3, 4, 5 ]
  21. # Objects and arrays with multiple values per-
  22. # line will continue to have multiple values
  23. # per-line, based on the average line length.
  24. multiLine: [
  25. 1, 2, 3
  26. 4, 5, 6
  27. ]
  28. # These should get averaged to 2.
  29. averageLines: [
  30. 1
  31. 2, 3
  32. 4, 5, 6
  33. ]
  34. # This works especially well for multi-dimensional
  35. # arrays (i.e. matrices).
  36. matrix: [
  37. [ 1, 2, 3 ]
  38. [ 4, 5, 6 ]
  39. [ 7, 8, 9 ]
  40. ]
  41. # Objects will do the same. Keys and values will
  42. # be correctly quoted, when necessary.
  43. multiLineObj: {
  44. "value1": 1, "value2": 2
  45. "value3": "three", "value4": 4
  46. }
  47. # Unnecessary quotes will be removed.
  48. unnecessaryQuotes: {
  49. "numPenguins": 36,
  50. "numPolarBears": "twenty-four"
  51. }
  52. # Just to verify that these still work.
  53. multiLineString:
  54. '''
  55. test
  56. and more test
  57. and still more
  58. '''
  59. }
Advertisement
Add Comment
Please, Sign In to add comment