go-json-path

go-json-path is a utility library to access JSON based configuration easily. Go language supports JSON format in the standard library. However, I feel that the standard library is not useful to parse any JSON formats [1] [2].

For that reason, I have developed the open source package to access JSON based configuration easily. Using go-json-path, you can get configuration values in the specified JSON file or string by the given path like Path. The example is bellow.

import (
    "config/jpath"
)

config, err := xjson.NewConfig()
if err != nil {
    t.Error(err)
}

err = config.ParseFromFile("/etc/profile.conf")
if err != nil {
    t.Error(err)
}

name, err := config.GetKeyStringByPath("/organizer/name")
if err != nil {
    t.Error(err)
}

age, err := config.GetKeyStringByPath("/organizer/age")
if err != nil {
    t.Error(err)
}

The configuration file format is based on JSON as the following.

#
#  /etc/profile.conf
#

{
    "organizer": {
        "name": "John Smith",
        "age": 33
    }
}

Repository

Documents

Please check the godoc of config/jpath as the following.

godoc -http=:6060

References

98 thoughts on “go-json-path

  1. Pingback: Leandro Farland

  2. Pingback: Cory Chase MILF City

  3. Pingback: MILF City

  4. Pingback: best-domain-broker

  5. Pingback: Assignment Help USA

  6. Pingback: valentine gift

  7. Pingback: personalized wedding gifts

  8. Pingback: valentines gift

  9. Pingback: organic calendula oil

  10. Pingback: Click Here

  11. Pingback: Click Here

  12. Pingback: Click Here

  13. Pingback: Click Here

  14. Pingback: Click Here

  15. Pingback: Click Here

  16. Pingback: Click Here

  17. Pingback: Click Here

  18. Pingback: Click Here

  19. Pingback: Click Here

  20. Pingback: Click Here

  21. Pingback: Click Here

  22. Pingback: Click Here

  23. Pingback: Click Here

  24. Pingback: Click Here

  25. Pingback: Click Here

  26. Pingback: Click Here

  27. Pingback: Click Here

  28. Pingback: Click Here

  29. Pingback: Click Here

  30. Pingback: Click Here

  31. Pingback: Click Here

  32. Pingback: Click Here

  33. Pingback: no code robotics

  34. Pingback: moveit studio

  35. Pingback: Click Here

  36. Pingback: remote control robotics

  37. Pingback: Click Here

  38. Pingback: Click Here

  39. Pingback: Click Here

  40. Pingback: Reputation Defenders

  41. Pingback: Reputation Defenders

  42. Pingback: Click Here

  43. Pingback: Click Here

  44. Pingback: Click Here

  45. Pingback: Click Here

  46. Pingback: Click Here

  47. Pingback: Click Here

  48. Pingback: Click Here

  49. Pingback: Click Here

  50. Pingback: Click Here

  51. Pingback: Click Here

  52. Pingback: Click Here

  53. Pingback: Click Here

  54. Pingback: Click Here

  55. Pingback: Click Here

  56. Pingback: Click Here

  57. Pingback: Click Here

  58. Pingback: grand rapids dentist

  59. Pingback: Click Here

  60. Pingback: Click Here

  61. Pingback: Click Here

  62. Pingback: https://gquery.org/

  63. Pingback: Click Here

  64. Pingback: Click Here

  65. Pingback: 카지노사이트

  66. Pingback: Click Here

  67. Pingback: Click Here

  68. Pingback: Click Here

  69. Pingback: Click Here

  70. Pingback: Click Here

  71. Pingback: Click Here

  72. Pingback: Click Here

  73. Pingback: Referral Code

  74. Pingback: Click Here

  75. Pingback: Click Here

  76. Pingback: Click Here

  77. Pingback: Click Here

  78. Pingback: Click Here

  79. Pingback: Click Here

  80. Pingback: Click Here

  81. Pingback: Click Here

  82. Pingback: Click Here

  83. Pingback: Click Here

  84. Pingback: Click Here

  85. Pingback: 온라인 슬롯 머신

  86. Pingback: 카지노 보너스 및 프로모션

  87. Pingback: 카지노 보너스 및 프로모션

  88. Pingback: best-domain-portfolio

  89. Pingback: domains

  90. Pingback: best cardano stake pool

  91. Pingback: top startup books

  92. Pingback: Google reviews

  93. Pingback: How to start porn

  94. Pingback: reputation defenders

  95. Pingback: 2023 Books

  96. Pingback: cemetery

  97. Pingback: burial

  98. Pingback: family member