0

I want to write java program to read set of data from YAML file in cloud foundry.

#Define CDN domains
---

    domains: 
     name : CDN1
     quality : 200..300
     cost : low
     location: http://

    name: CDN2
    quality: 400..500
    cost: high
    location: http://

Then, in the program based on the name and quality it should redirect the first request to new location. Can anyone help me for this? I`m entirely new in YAML! Based on my search, I can use snacked YAML or bean YAML, but I don't know what difference is.

omid
  • 21
  • 7

1 Answers1

0

You can use Jackson to read YAML, which is widely supported in Spring: https://github.com/FasterXML/jackson-dataformat-yaml

DeejUK
  • 12,891
  • 19
  • 89
  • 169
  • Thank you. I can read YAML file with Jackson but now my question is how I can use if condition when I read data? – omid Nov 14 '16 at 16:33
  • @Omid then that should be a separate new question on Stack Overflow – DeejUK Nov 14 '16 at 17:38