Commit 9617aa91 authored by Christoph Mayr's avatar Christoph Mayr

json is getting parsed nojson is getting parsed now

parent eadec0c7
......@@ -4,7 +4,6 @@
<list default="true" id="03703853-d797-498e-a74c-c726d51baed3" name="Default" comment="">
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/index.js" afterPath="$PROJECT_DIR$/index.js" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/minijson.json" afterPath="$PROJECT_DIR$/minijson.json" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/package-lock.json" afterPath="$PROJECT_DIR$/package-lock.json" />
</list>
<ignored path="$PROJECT_DIR$/.tmp/" />
<ignored path="$PROJECT_DIR$/temp/" />
......@@ -21,8 +20,8 @@
<file leaf-file-name="index.js" pinned="false" current-in-tab="true">
<entry file="file://$PROJECT_DIR$/index.js">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="375">
<caret line="25" column="56" lean-forward="false" selection-start-line="25" selection-start-column="56" selection-end-line="25" selection-end-column="56" />
<state relative-caret-position="563">
<caret line="77" column="4" lean-forward="false" selection-start-line="77" selection-start-column="4" selection-end-line="77" selection-end-column="4" />
<folding />
</state>
</provider>
......@@ -51,11 +50,9 @@
<file leaf-file-name="minijson.json" pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/minijson.json">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="285">
<caret line="19" column="0" lean-forward="false" selection-start-line="19" selection-start-column="0" selection-end-line="19" selection-end-column="0" />
<folding>
<marker date="1528811787860" expanded="true" signature="0:956" ph="[...]" />
</folding>
<state relative-caret-position="60">
<caret line="4" column="0" lean-forward="false" selection-start-line="4" selection-start-column="0" selection-end-line="4" selection-end-column="0" />
<folding />
</state>
</provider>
</entry>
......@@ -90,8 +87,8 @@
<list>
<option value="$PROJECT_DIR$/package.json" />
<option value="$PROJECT_DIR$/.gitignore" />
<option value="$PROJECT_DIR$/minijson.json" />
<option value="$PROJECT_DIR$/pokemon.json" />
<option value="$PROJECT_DIR$/minijson.json" />
<option value="$PROJECT_DIR$/index.js" />
</list>
</option>
......@@ -173,12 +170,12 @@
<option name="number" value="Default" />
<option name="presentableId" value="Default" />
<updated>1528804284204</updated>
<workItem from="1528804285428" duration="3815000" />
<workItem from="1528804285428" duration="4260000" />
</task>
<servers />
</component>
<component name="TimeTrackingManager">
<option name="totallyTimeSpent" value="3815000" />
<option name="totallyTimeSpent" value="4260000" />
</component>
<component name="ToolWindowManager">
<frame x="0" y="23" width="1440" height="877" extended-state="0" />
......@@ -230,16 +227,6 @@
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/minijson.json">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="285">
<caret line="19" column="0" lean-forward="false" selection-start-line="19" selection-start-column="0" selection-end-line="19" selection-end-column="0" />
<folding>
<marker date="1528811787860" expanded="true" signature="0:956" ph="[...]" />
</folding>
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/pokemon.json">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="0">
......@@ -256,10 +243,18 @@
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/minijson.json">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="60">
<caret line="4" column="0" lean-forward="false" selection-start-line="4" selection-start-column="0" selection-end-line="4" selection-end-column="0" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/index.js">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="375">
<caret line="25" column="56" lean-forward="false" selection-start-line="25" selection-start-column="56" selection-end-line="25" selection-end-column="56" />
<state relative-caret-position="563">
<caret line="77" column="4" lean-forward="false" selection-start-line="77" selection-start-column="4" selection-end-line="77" selection-end-column="4" />
<folding />
</state>
</provider>
......
......@@ -24,11 +24,11 @@ rl.on('line', function(line) {
// write relevant properties to output JSON file
outJson["poke_id"] = lineJson.Number
outJson["poke_txt_en"] = lineJson.Name
outJson["gen_txt_en"] = lineJson.Generation
outJson["about_txt_en"] = lineJson.About
outJson["types_features"] = linejson.Types
outJson["poke_id"] = lineJson.number
outJson["poke_txt_en"] = lineJson.name
outJson["gen_txt_en"] = lineJson.generation
outJson["about_txt_en"] = lineJson.about
outJson["types_features"] = lineJson.types
/*
// opening_text is optional
......@@ -75,7 +75,7 @@ function sendData(postData){
}
// on response from server, log response
// let response = request('POST', 'http://localhost:8983/solr/gettingstarted/update/json/docs?commit=true&overwrite=true', clientServerOptions);
let response = request('POST', 'http://localhost:8983/solr/gettingstarted/update/json/docs?commit=true&overwrite=true', clientServerOptions);
if (response.statusCode !== 200) {
throw(response.body)
} else {
......
[{
"number":"001",
"name": "Bulbasaur",
"generation": "Generation I",
"about": "Bulbasaur can be seen napping in bright sunlight. There is a seed on its back. By soaking up the sun's rays, the seed grows progressively larger.",
"types": ["Grass","Poison"]
},{
"number": "002",
"name": "Ivysaur",
"generation": "Generation I",
"about": "There is a bud on this Pokemon's back. To support its weight, Ivysaur's legs and trunk grow thick and strong. If it starts spending more time lying in the sunlight, it's a sign that the bud will bloom into a large flower soon.",
"types": ["Grass","Poison"]
},{
"number": "003",
"name": "Venusaur",
"generation": "Generation I",
"about": "There is a large flower on Venusaur's back. The flower is said to take on vivid colors if it gets plenty of nutrition and sunlight. The flower's aroma soothes the emotions of people.",
"types": ["Grass","Poison"]
}]
[
{"number":"001", "name": "Bulbasaur", "generation": "Generation I", "about": "Bulbasaur can be seen napping in bright sunlight. There is a seed on its back. By soaking up the sun's rays, the seed grows progressively larger.", "types": ["Grass","Poison"]}
,
{"number": "002", "name": "Ivysaur", "generation": "Generation I", "about": "There is a bud on this Pokemon's back. To support its weight, Ivysaur's legs and trunk grow thick and strong. If it starts spending more time lying in the sunlight, it's a sign that the bud will bloom into a large flower soon.", "types": ["Grass","Poison"]}
,
{"number": "003", "name": "Venusaur", "generation": "Generation I", "about": "There is a large flower on Venusaur's back. The flower is said to take on vivid colors if it gets plenty of nutrition and sunlight. The flower's aroma soothes the emotions of people.", "types": ["Grass","Poison"]}
]
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment