如何使用jquery将yaml文件转换为json?

时间:2015-05-19 12:21:11

标签: jquery json yaml

我需要进行yaml验证并避免重复输入。输入是从用户处接收的yaml文件。

请帮助我解决这个问题?

receipt:     Oz-Ware Purchase Invoice
date:        2012-08-06
    customer:
       given:   Dorothy
       family:  Gale

    items:
       - part_no:   A4786
         descrip:   Water Bucket (Filled)
         price:     1.47
         quantity:  4

       - part_no:   E1628
         descrip:   High Heeled "Ruby" Slippers
         size:      8
         price:     100.27
         quantity:  1

         bill-to:  &id001
         street: |
            123 Tornado Alley
            Suite 16
         city:   East Centerville
         state:  KS

         ship-to:  *id001

         specialDelivery:  >
         Follow the Yellow Brick
         Road to the Emerald City.
         Pay no attention to the
         man behind the curtain.
    ...

0 个答案:

没有答案