Reading EDN - an extensible data notation format.
Code: "io_edn.py". Programming language: Python DMelt Version 1. Last modified: 03/13/2016. License: Pro
https://datamelt.org/code/cache/io_edn_2164.py
To run this script using the DMelt IDE, copy the above URL link to the menu [File]→[Read script from URL] of the DMelt IDE.


 
from us.bpsm.edn.parser import Parsers 
from us.bpsm.edn.parser import Parser
from us.bpsm.edn.parser import Parseable
from us.bpsm.edn.parser.Parsers import defaultConfiguration;
from java.util import *


pbr = Parsers.newParseable("{:x 1, :y 2}");
p = Parsers.newParser(defaultConfiguration());
a=p.nextValue(pbr)
print type(a), ":", a


pbr = Parsers.newParseable("{1 0 2 9 3 8 4 7 5 6}")
a=p.nextValue(pbr)
print type(a), ":", a



Ads help maintain this website.