bee_api 0.0.5

Sign up to get free protection for your applications and to get access to all the features.
Files changed (108) hide show
  1. data/bin/bee_api +84 -0
  2. data/lib/mdpreview.rb +80 -0
  3. data/lib/mdpreview/translator.rb +60 -0
  4. data/lib/mdpreview/version.rb +3 -0
  5. data/test/mdptest.rb +100 -0
  6. data/vendor/HISTORY.md +237 -0
  7. data/vendor/Jakefile.js +316 -0
  8. data/vendor/LICENSE +176 -0
  9. data/vendor/NOTICE +17 -0
  10. data/vendor/README.md +102 -0
  11. data/vendor/app/chrome/documentation.txt +12 -0
  12. data/vendor/app/chrome/manifest.json +24 -0
  13. data/vendor/app/web/ajax.js +43 -0
  14. data/vendor/app/web/app.css +292 -0
  15. data/vendor/app/web/app.js +377 -0
  16. data/vendor/app/web/beta/index.html +17 -0
  17. data/vendor/app/web/datapolicy.txt +48 -0
  18. data/vendor/app/web/doc/doc.css +60 -0
  19. data/vendor/app/web/doc/img/actions_menu.png +0 -0
  20. data/vendor/app/web/doc/img/button_actions_menu.png +0 -0
  21. data/vendor/app/web/doc/img/button_dragarea.png +0 -0
  22. data/vendor/app/web/doc/img/jsoneditor.png +0 -0
  23. data/vendor/app/web/doc/img/jsonformatter.png +0 -0
  24. data/vendor/app/web/doc/img/main_menu.png +0 -0
  25. data/vendor/app/web/doc/img/splitter.png +0 -0
  26. data/vendor/app/web/doc/index.html +201 -0
  27. data/vendor/app/web/favicon.ico +0 -0
  28. data/vendor/app/web/fileretriever.css +54 -0
  29. data/vendor/app/web/fileretriever.js +567 -0
  30. data/vendor/app/web/fileretriever.php +120 -0
  31. data/vendor/app/web/googlea47c4a0b36d11021.html +1 -0
  32. data/vendor/app/web/hash.js +133 -0
  33. data/vendor/app/web/img/description.txt +20 -0
  34. data/vendor/app/web/img/header_background.png +0 -0
  35. data/vendor/app/web/img/icon_128.png +0 -0
  36. data/vendor/app/web/img/icon_16.png +0 -0
  37. data/vendor/app/web/img/icon_gray.svg +151 -0
  38. data/vendor/app/web/img/icon_gray_16.svg +150 -0
  39. data/vendor/app/web/img/icon_orange.svg +151 -0
  40. data/vendor/app/web/img/logo.png +0 -0
  41. data/vendor/app/web/img/logo.xcf +0 -0
  42. data/vendor/app/web/img/logo_app.png +0 -0
  43. data/vendor/app/web/img/logo_app.xcf +0 -0
  44. data/vendor/app/web/index.html +191 -0
  45. data/vendor/app/web/notify.js +150 -0
  46. data/vendor/app/web/queryparams.js +71 -0
  47. data/vendor/app/web/robots.txt +0 -0
  48. data/vendor/app/web/splitter.js +179 -0
  49. data/vendor/app/web/test.html +224 -0
  50. data/vendor/component.json +33 -0
  51. data/vendor/docs/api.md +188 -0
  52. data/vendor/docs/usage.md +137 -0
  53. data/vendor/examples/01_basic_usage.html +45 -0
  54. data/vendor/examples/02_viewer.html +38 -0
  55. data/vendor/examples/03_switch_mode.html +98 -0
  56. data/vendor/examples/cur.file +1 -0
  57. data/vendor/examples/jquery.js +2 -0
  58. data/vendor/examples/meta.js +1 -0
  59. data/vendor/examples/requirejs_demo/requirejs_demo.html +19 -0
  60. data/vendor/examples/requirejs_demo/scripts/main.js +25 -0
  61. data/vendor/examples/requirejs_demo/scripts/require.js +35 -0
  62. data/vendor/img/jsoneditor-icons.png +0 -0
  63. data/vendor/jsoneditor-min.css +1 -0
  64. data/vendor/jsoneditor-min.js +34 -0
  65. data/vendor/jsoneditor.css +597 -0
  66. data/vendor/jsoneditor.js +6069 -0
  67. data/vendor/jsoneditor/css/contextmenu.css +219 -0
  68. data/vendor/jsoneditor/css/img/description.txt +13 -0
  69. data/vendor/jsoneditor/css/img/export.sh +16 -0
  70. data/vendor/jsoneditor/css/img/jsoneditor-icons.png +0 -0
  71. data/vendor/jsoneditor/css/img/jsoneditor-icons.svg +861 -0
  72. data/vendor/jsoneditor/css/jsoneditor.css +220 -0
  73. data/vendor/jsoneditor/css/menu.css +81 -0
  74. data/vendor/jsoneditor/css/searchbox.css +73 -0
  75. data/vendor/jsoneditor/js/appendnode.js +211 -0
  76. data/vendor/jsoneditor/js/contextmenu.js +440 -0
  77. data/vendor/jsoneditor/js/header.js +32 -0
  78. data/vendor/jsoneditor/js/highlighter.js +82 -0
  79. data/vendor/jsoneditor/js/history.js +218 -0
  80. data/vendor/jsoneditor/js/jsoneditor.js +206 -0
  81. data/vendor/jsoneditor/js/module.js +50 -0
  82. data/vendor/jsoneditor/js/node.js +2864 -0
  83. data/vendor/jsoneditor/js/searchbox.js +288 -0
  84. data/vendor/jsoneditor/js/texteditor.js +311 -0
  85. data/vendor/jsoneditor/js/treeeditor.js +770 -0
  86. data/vendor/jsoneditor/js/util.js +582 -0
  87. data/vendor/lib/ace/ace.js +11 -0
  88. data/vendor/lib/ace/mode-json.js +1 -0
  89. data/vendor/lib/ace/theme-jsoneditor.js +144 -0
  90. data/vendor/lib/ace/theme-textmate.js +163 -0
  91. data/vendor/lib/ace/worker-json.js +1 -0
  92. data/vendor/lib/jsonlint/README.md +62 -0
  93. data/vendor/lib/jsonlint/jsonlint.js +432 -0
  94. data/vendor/misc/screenshots/actionsmenu_640x400.png +0 -0
  95. data/vendor/misc/screenshots/codeeditor_640x400.png +0 -0
  96. data/vendor/misc/screenshots/description.json +17 -0
  97. data/vendor/misc/screenshots/jsoneditoronline.png +0 -0
  98. data/vendor/misc/screenshots/jsoneditoronline_640x400.png +0 -0
  99. data/vendor/misc/screenshots/search_640x400.png +0 -0
  100. data/vendor/misc/screenshots/small_tile.xcf +0 -0
  101. data/vendor/misc/screenshots/small_tile_440x280.png +0 -0
  102. data/vendor/misc/todo.txt +101 -0
  103. data/vendor/package.json +28 -0
  104. data/vendor/test/couchdbeditor.html +100 -0
  105. data/vendor/test/largefile.json +12605 -0
  106. data/vendor/test/test_ace.html +60 -0
  107. data/vendor/test/test_editable_div.html +449 -0
  108. metadata +154 -0
@@ -0,0 +1,84 @@
1
+ #!/usr/bin/env ruby
2
+ # encoding: utf-8
3
+
4
+ require 'mdpreview'
5
+ require 'pathname'
6
+ require 'json'
7
+ # p ARGV
8
+ # puts Mdpreview.hi(ARGV)
9
+
10
+ # puts __FILE__
11
+ # puts File.dirname(__FILE__)
12
+
13
+
14
+ # File.join(File.dirname(__FILE__), '..', 'lib')
15
+ path = Pathname.new(File.join(File.dirname(__FILE__), '..')).realpath.to_s
16
+ p "Bee API Request starting ...."
17
+
18
+ require 'optparse'
19
+
20
+ options = {}
21
+ option_parser = OptionParser.new do |opts|
22
+ # 这里是这个命令行工具的帮助信息
23
+ opts.banner = 'open and modify markdown file of the command line tool.'
24
+
25
+ # # Option 作为switch,不带argument,用于将switch设置成true或false
26
+ options[:log] = false
27
+ # 下面第一项是Short option(没有可以直接在引号间留空),第二项是Long option,第三项是对Option的描述
28
+ opts.on('-l', '--log', 'is show log details') do
29
+ # 这个部分就是使用这个Option后执行的代码
30
+ options[:log] = true
31
+ end
32
+
33
+
34
+ # Option 作为flag,带argument,用于将argument作为数值解析,比如"name"信息
35
+ #下面的“value”就是用户使用时输入的argument
36
+ opts.on('-f sourceFileNAME', '--name sourceFileNAME', 'Pass-in source file name') do |value|
37
+ # options[:fname] = value
38
+
39
+ # Mdpreview.hi(path+'/'+value)
40
+ gem_root_path = File.expand_path('./', value)
41
+
42
+ p gem_root_path
43
+
44
+ data = IO.readlines(gem_root_path).join('')
45
+
46
+ result = JSON.parse(data)
47
+
48
+ p "url = "+result['url']
49
+ p "params = "+result['params'].to_s
50
+ p "method = "+result['method']
51
+
52
+ if result['method'] == 'post'
53
+ # post
54
+ easy_post(result['url'],result['params']) {|x| p x.body}
55
+
56
+ elsif
57
+ # get
58
+ # easy_get(value)
59
+ uri = '?'
60
+ result['params'].each do |z|
61
+ uri += z[0] +'&' +z[1]
62
+ end
63
+
64
+ url = result['url'] + uri
65
+ easy_get(url)
66
+ end
67
+
68
+ # easy_post(result['url'],result['params']) {|x| p x.body}
69
+
70
+ end
71
+
72
+ opts.on('-g sourceFileNAME', '--name sourceFileNAME', 'Pass-in get url') do |value|
73
+ # options[:fname] = value
74
+ easy_get(value)
75
+ # Mdpreview.hi(path+'/'+value)
76
+ end
77
+
78
+ # Option 作为flag,带一组用逗号分割的arguments,用于将arguments作为数组解析
79
+ # opts.on('-a A,B', '--array A,B', Array, 'List of arguments') do |value|
80
+ # options[:array] = value
81
+ # end
82
+ end.parse!
83
+
84
+ puts options.inspect
@@ -0,0 +1,80 @@
1
+ require "mdpreview/version"
2
+ require 'mdpreview/translator'
3
+
4
+ # require 'profile'
5
+ require 'net/http'
6
+ require 'uri'
7
+
8
+ # require "iconv"
9
+ #
10
+ # class String
11
+ # def to_gbk
12
+ # Iconv.iconv("GBK//IGNORE", "UTF-8//IGNORE", self).to_s
13
+ # end
14
+ #
15
+ # def to_utf8
16
+ # #p "my own string"
17
+ # Iconv.iconv("UTF-8//IGNORE", "GBK//IGNORE", self).to_s
18
+ # end
19
+ #
20
+ # def to_utf8_valid
21
+ #
22
+ # if !self.valid_encoding?
23
+ # ic = Iconv.new('UTF-8//IGNORE', 'UTF-8')
24
+ # return ic.iconv(self)
25
+ # end
26
+ # self
27
+ # end
28
+ #
29
+ # end
30
+
31
+ module Kernel
32
+ def easy_get(url)
33
+ puts "\n[GET] #{url}\n"
34
+ # p Net::HTTP.get_print URI.parse(url)
35
+
36
+ resp = Net::HTTP.get_response(URI.parse(url))
37
+ data = resp.body
38
+ p "json = "+data
39
+
40
+ Mdpreview.create_json_file(data)
41
+ # we convert the returned JSON data to native Ruby
42
+ # data structure - a hash
43
+ # result = JSON.parse(data)
44
+
45
+ end
46
+
47
+
48
+ def easy_post(url,params,&block)
49
+ res = Net::HTTP.post_form(URI.parse(url),params)
50
+ puts "\n\n[POST] #{url}?#{params.to_s}\n"
51
+ p "#{res}\n#{res.body}"
52
+
53
+ Mdpreview.create_json_file(res.body)
54
+
55
+ if block_given?
56
+ block.call(res)
57
+ end
58
+ end
59
+ end
60
+
61
+
62
+ module Mdpreview
63
+ # Your code goes here...
64
+ def self.hi(a)
65
+ translator = Translator.new(a)
66
+ translator.hi
67
+ # puts version info
68
+ p VERSION
69
+
70
+ end
71
+
72
+ def self.create_json_file(data)
73
+ Translator.create_json_file(data)
74
+ # puts version info
75
+ p VERSION
76
+
77
+ end
78
+
79
+
80
+ end
@@ -0,0 +1,60 @@
1
+ require 'pathname'
2
+ require 'FileUtils'
3
+
4
+ class Mdpreview::Translator
5
+ def initialize(source_file_path)
6
+ #源文件路径
7
+ @source_file_path = source_file_path
8
+ #gem跟目录
9
+ @gem_root_path = File.expand_path('../', @source_file_path)
10
+ #editor path
11
+ @editor_path = Pathname.new(File.expand_path('../../../vendor/examples', __FILE__)).realpath.to_s
12
+
13
+ p "@gem root_path:::"+@gem_root_path
14
+ p "@src file_path:::"+@source_file_path
15
+ p "@editor path :::"+@editor_path
16
+
17
+ end
18
+
19
+ def hi
20
+ generate_meta_js
21
+ cp_source_file_to_cur_file
22
+ open_in_browser
23
+ end
24
+
25
+ def open_in_browser
26
+ p `open #{@editor_path}/03_switch_mode.html`
27
+ end
28
+
29
+ def generate_meta_js
30
+ f=File.new(File.join(@editor_path,"meta.js"), "w+")
31
+ f.puts("#{@source_file_path}")
32
+ end
33
+
34
+ def cp_source_file_to_cur_file
35
+ f=File.new(File.join(@editor_path,"cur.file"), "w+")
36
+ FileUtils.cp @source_file_path,f
37
+ end
38
+
39
+ def self.create_json_file(data)
40
+ #gem跟目录
41
+ gem_root_path = File.expand_path('../', @source_file_path)
42
+ f=File.new(File.join(gem_root_path,"data.json"), "w+")
43
+ f.puts("#{data}")
44
+
45
+ editor_path = Pathname.new(File.expand_path('../../../vendor/examples', __FILE__)).realpath.to_s
46
+
47
+ f=File.new(File.join(editor_path,"meta.js"), "w+")
48
+ f.puts("#{gem_root_path}/data.json")
49
+
50
+ f.close
51
+ p "#{data}"
52
+ c=File.new(File.join(editor_path,"cur.file"), "w+")
53
+ c.puts("#{data}")
54
+ c.close
55
+
56
+ p `open #{editor_path}/03_switch_mode.html`
57
+
58
+ end
59
+
60
+ end
@@ -0,0 +1,3 @@
1
+ module Mdpreview
2
+ VERSION = "0.0.5"
3
+ end
@@ -0,0 +1,100 @@
1
+ require 'test/unit'
2
+ #
3
+ $LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
4
+
5
+ require 'mdpreview'
6
+ # $LOAD_PATH.unshift(File.dirname(__FILE__))
7
+ #
8
+ #
9
+ #
10
+ # 各assertion的最后一个参数message表示测试失败时显示的消息
11
+ #
12
+ # assert(boolean, message="")
13
+ # 若boolean为真则pass
14
+ #
15
+ # assert_equal(expected, actual, message=nil)
16
+ # 若expected == actual则pass
17
+ #
18
+ # assert_not_equal(expected, actual, message="")
19
+ # 若expected != actual则pass
20
+ #
21
+ # assert_instance_of(klass, object, message="")
22
+ # 若klass == object.class为真则pass
23
+ #
24
+ # assert_nil(object, message="")
25
+ # 若object.nil?则pass
26
+ #
27
+ # assert_not_nil(object, message="")
28
+ # 若!object.nil?则pass
29
+ #
30
+ # assert_kind_of(klass, object, message="")
31
+ # 若object.kind_of?(klass)为真则pass
32
+ #
33
+ # assert_respond_to(object, method, message="")
34
+ # 若object.respond_to?(method)为真则pass
35
+ #
36
+ # assert_match(pattern, string, message="")
37
+ # 若string =~ pattern为真则pass
38
+ #
39
+ # assert_no_match(regexp, string, message="")
40
+ # 若regexp !~ string为真则pass
41
+ #
42
+ # assert_same(expected, actual, message="")
43
+ # 若actual.equal?(expected) 为真则 pass
44
+ #
45
+ # assert_not_same(expected, actual, message="")
46
+ # 若!actual.equal?(expected) 为真则 pass
47
+ #
48
+ # assert_operator(object1, operator, object2, message="")
49
+ # 若object1.send(operator, object2) 为真则 pass
50
+ #
51
+ # assert_raises(expected_exception_klass, message="") { ... }
52
+ # 执行块的内容引发异常, 若该异常属于expected_exception_klass类则pass
53
+ #
54
+ # assert_nothing_raised(*args) { ... }
55
+ # 执行块的内容, 若没有引发异常则pass
56
+ #
57
+ # flunk(message="")
58
+ # 通常会失败
59
+ #
60
+ # assert_throws(expected_symbol, message="") { ... }
61
+ # 执行块的内容,若:expected_symbol被throw了,则pass
62
+ #
63
+ # assert_nothing_thrown(message="") { ... }
64
+ # 执行块的内容, 若没有发生throw则pass
65
+ #
66
+ # assert_in_delta(expected_float, actual_float, delta, message="")
67
+ # 若(expected_float.to_f - actual_float.to_f).abs <= delta.to_f 为真则 pass
68
+ #
69
+ # delta必须是正数。
70
+ #
71
+ # assert_send(send_array, message="")
72
+ # 若send_array[0].__send__(send_array[1], *send_array[2..-1])为真则 pass
73
+ #
74
+ # assert_block(message="") { ... }
75
+ # 若block的结果为真则 pass
76
+
77
+ class MdpreviewTest < Test::Unit::TestCase
78
+ # include Mdpreview
79
+
80
+ def setup
81
+ @friends = ['dell', 'apple', 'sony']
82
+ end
83
+
84
+ def teardown
85
+ end
86
+
87
+ def test_add
88
+ # Mdpreview.hi "sss"
89
+
90
+
91
+ assert_instance_of(Array, @friends, "The @friends must be Array")
92
+
93
+ assert_equal(3, @friends.size, "The size is not 3")
94
+
95
+ @friends << 'acer'
96
+ assert_equal(4, @friends.size, "The size is not 4")
97
+ end
98
+
99
+
100
+ end
@@ -0,0 +1,237 @@
1
+ # JSON Editor Online - History
2
+
3
+ http://jsoneditoronline.org
4
+
5
+ ## 2013-05-04, version 2.2.0
6
+
7
+ - Unified JSONFormatter and JSONEditor in one editor with a switchable mode.
8
+ - Urls are navigable now.
9
+ - Improved error and log handling.
10
+ - Added jsoneditor to package managers npm and bower.
11
+
12
+
13
+ ## 2013-03-11, version 2.1.1
14
+
15
+ - Fixed an issue with console outputs on IE8, causing the editor not to work
16
+ at all on IE8.
17
+
18
+
19
+ ## 2013-03-08, version 2.1.0
20
+
21
+ - Replaced the plain text editor with code editor Ace, which brings in syntax
22
+ highlighting and code inspection.
23
+ - Improved the splitter between the two panels. Panels can be hided.
24
+
25
+
26
+ ## 2013-02-26, version 2.0.2
27
+
28
+ - Fixed: dragarea of the root node was wrongly visible is removed now.
29
+
30
+
31
+ ## 2013-02-21, version 2.0.1
32
+
33
+ - Fixed undefined variable in the redo method.
34
+ - Removed the "hide ads" button. Not allowed by Google AdSense, sorry.
35
+
36
+
37
+ ## 2013-02-09, version 2.0.0
38
+
39
+ - Implemented a context menu, replacing the action buttons on the right side of
40
+ the editor and the inline action buttons. This gives a cleaner interface,
41
+ more space for the actual contents, and more room for new controls (like
42
+ insert and sort).
43
+ - Implemented shortcut keys. The JSON Editor can be used with just a keyboard.
44
+ - Implemented sort action, which sorts the childs of an array or object.
45
+ - Implemented auto scrolling up and down when dragging a node and reaching
46
+ the top or bottom of the editor.
47
+ - Added support for CommonJS and RequireJS.
48
+ - Added more examples.
49
+ - Improved performance and memory usage.
50
+ - Implemented a new mode 'form', in which only values are editable and the
51
+ fields are fixed.
52
+ - Minor improvements and bug fixes.
53
+
54
+
55
+ ## 2012-12-08, version 1.7.0
56
+
57
+ - Implemented two modes: 'editor' (default), and 'viewer'. In viewer mode,
58
+ the data and datastructure is read-only.
59
+ - Implemented methods set(json, name), setName(name), and getName(), which
60
+ allows for setting and getting the field name of the root node.
61
+ - Fixed an issue where the search bar does not work when there is no global
62
+ window.editor object.
63
+
64
+
65
+ ## 2012-11-26, version 1.6.2
66
+
67
+ - Fixed a bug in the change callback handler, resulting in an infinite loop
68
+ when requesting the contents of the editor inside the callback (issue #19).
69
+
70
+
71
+ ## 2012-11-21, version 1.6.1
72
+
73
+ - Added a request header "Accept: application/json" when loading files and urls.
74
+
75
+
76
+ ## 2012-11-03, version 1.6.0
77
+
78
+ - Added feature to the web application to load and save files from disk and url.
79
+ - Improved error messages in the web application using JSONLint.
80
+ - Made the web application pass the W3C markup validation service.
81
+ - Added option 'change' to both editor and formatter, which allows to set a
82
+ callback which is triggered when the contents of the editor or formatter
83
+ changes.
84
+ - Changed the default indentation of the JSONFormatter to 4 spaces.
85
+ - Renamed options 'enableSearch' and 'enableHistory' to 'search' and 'history'
86
+ respectively.
87
+ - Added parameter 'json' to the JSONFormatter constructor.
88
+ - Added option 'indentation' to the JSONFormatter.
89
+
90
+
91
+ ## 2012-10-08, version 1.5.1
92
+
93
+ - Replaced the paid Chrome App with a free, hosted Chrome App (with ads).
94
+
95
+
96
+ ## 2012-10-02, version 1.5.0
97
+
98
+ - Implemented history: undo/redo all actions.
99
+ - Created menu icons (instead of text buttons).
100
+ - Cleaned up the code (removed unused params, improved comments, etc).
101
+ - Minor performance improvements.
102
+
103
+
104
+ ## 2012-08-31, version 1.4.4
105
+
106
+ - Changed: description of advertisement now gives information about the Chrome
107
+ App (without ads).
108
+ - Changed: Chrome App is now configured to be available offline.
109
+ - Fixed: When zooming your browser window, the fields/values did get wrapped
110
+ on Chrome (thanks Henri Gourvest), and on Firefox sometimes the jsoneditor
111
+ disappeared due to wrapping of the interface contents.
112
+
113
+
114
+ ## 2012-08-25, version 1.4.3
115
+
116
+ - Changed: changed code for the buttons to copy from formatter to editor and
117
+ vice versa, no inline javascript (gives security policy errors in chrome app).
118
+
119
+
120
+ ## 2012-08-25, version 1.4.2
121
+
122
+ - Changed: other bootstrapping mechanism for the chrome app, in a separate
123
+ javascript file, as inline javascript is not allowed (security policy).
124
+ - Fixed: drop down menu for changing the field type did throw javascript errors
125
+ (did not break any functionality though).
126
+
127
+
128
+ ## 2012-08-23, version 1.4.1
129
+
130
+ - New: Chrome app created.
131
+
132
+
133
+ ## 2012-08-23, version 1.4.0
134
+
135
+ - New: Improved icon, logo, and interface header.
136
+
137
+
138
+ ## 2012-08-19, version 1.3.0
139
+
140
+ - New: Added buttons next and previous to the search box in the upper right.
141
+ - New: Escape characters are automatically inserted before " and \ missing
142
+ and escape character, making the string contents valid JSON. New lines are
143
+ automatically replaced with \n. (Thanks Steve Clay)
144
+ - Changed: all icons have been put in a single sprite. This will improve page
145
+ load times as there are much less server requests needed to load the editor.
146
+
147
+
148
+ ## 2012-08-12, version 1.2.0
149
+
150
+ - New: Added search functionality. Search results are expanded and highlighed.
151
+ Quickkeys in the search box: Enter (next), Shift+Enter (previous), Ctrl+Enter
152
+ (search again).
153
+ - New: The position of the vertical separator between left and right panel is
154
+ stored.
155
+ - New: Link to the sourcecode on github added at the bottom of the page.
156
+ - Changed: Refinements in the layout: fonts, colors, icons.
157
+ - Fixed: leading an trailing spaces not being displayed in the editor.
158
+ - Fixed: wrapping of long words and urls in Chrome.
159
+ - Fixed: ignoring functions and undefined values in the loaded JSON object
160
+ (they where interpreted as empty object and string instead of being ignored).
161
+
162
+
163
+ ## 2012-07-01, version 1.1.1
164
+
165
+ - Fixed global event listener for the focus/blur events, causing changes in
166
+ fields and values not always being registered.
167
+ - Fixed a css issue with Firefox (box-sizing of the editor).
168
+
169
+
170
+ ## 2012-04-24, version 1.1
171
+
172
+ - Fixed a bug. Dragging an object down which has been expanded and collapsed
173
+ again did not work.
174
+ - Using a minified version of jsoneditor.js, to improve page load time and
175
+ save bandwidth.
176
+
177
+
178
+ ## 2012-04-21, version 1.0
179
+
180
+ - Values are no longer aligned in one global column, but placed directly right
181
+ from the field. Having field and value close together improves readability,
182
+ especially in case of deeply nested data.
183
+ - Values are colorized by their type: strings are green, values read, booleans
184
+ blue, and null is purple.
185
+ - Font is changed to a monotype font for better readability.
186
+ - Special characters like \t are now handled nicely.
187
+ - Overall performance and memory usage improved.
188
+ - When clicking on whitespace, focus is set to the closest field or value.
189
+ - some other small interface tweaks.
190
+ - Fixed a bug with casting a value from type auto to string and vice versa
191
+ (the value was not casted at all).
192
+
193
+
194
+ ## 2012-03-01, version 0.9.10
195
+
196
+ - Nicer looking select box for the field types, with icons.
197
+ - Improved drag and drop: better visualized, and now working in all browers.
198
+ - Previous values will be restored after changing the type of a field. When
199
+ changing the type back, the previous value or childs will be restored.
200
+ - When hovering buttons (fieldtype, duplicate, delete, add) or when dragging
201
+ a field, corresponding field including its childs is highlighted. This makes
202
+ it easier to see what part of the data will be edited.
203
+ - Errors are now displayed in a message window on top of the page instead of
204
+ an alert which pops up.
205
+ - Fixed a bug with displaying enters in fields.
206
+ - Fixed a bug where the last trailing enter was removed when setting json
207
+ in the editor.
208
+ - Added a fix to get around Internet Explorer 8 issues with vertical scrollbars.
209
+
210
+
211
+ ## 2012-01-29, version 0.9.9
212
+
213
+ - Fields can be duplicated
214
+ - Support for drag and drop:
215
+ - fields in the editor itself can be moved via drag and drop
216
+ - fields can be exported from the editor as JSON
217
+ - external JSON can be dropped inside the editor
218
+ - When changing type from array to object and vice versa, childs will be
219
+ maintained instead of removed.
220
+ - Updated interface. Works now in IE8 too.
221
+
222
+
223
+ ## 2012-01-16, version 0.9.8
224
+
225
+ - Improved the performance of expanding a node with all its childs.
226
+
227
+
228
+ ## 2012-01-09, version 0.9.7
229
+
230
+ - Added functionallity to expand/collapse a node and all its childs. Click
231
+ the expand button of a node while holding Ctrl down.
232
+ - Small interface improvements
233
+
234
+
235
+ ## 2011-11-28, version 0.9.6
236
+
237
+ - First fully usable version of the JSON editor