Skip to content

Commit d64429c

Browse files
Update README.md to reflect 0.15.0 release
1 parent 80379c5 commit d64429c

File tree

1 file changed

+36
-9
lines changed

1 file changed

+36
-9
lines changed

README.md

Lines changed: 36 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -16,18 +16,45 @@ https://tea-age.solutions/downloads/<br>
1616
Also, a Library bundle with more example scripts is available in the download section as well.
1717

1818
# About TeaScript
19-
**What is new in TeaScript 0.14.0?** TeaScript 0.14 comes with the Tea StackVM, a Compiler, Dis-/Assembler, Suspend+Continue, Yield, improved debugging and more.<br>
19+
**What is new in TeaScript 0.15.0?** TeaScript 0.15 comes with a Web Server / Web Client module preview, full JSON read/write support and more.<br>
2020
<br>Get all infos in the **latest news** article:<br>
21-
https://tea-age.solutions/2024/05/15/release-of-teascript-0-14-0/ <br>
21+
https://tea-age.solutions/2024/09/01/release-of-teascript-0-15-0/ <br>
2222

2323
## Summary of the latest release
24-
- (automatically) **compile** and **execute** TeaScript files in the new **integrated Tea StackVM**.
25-
- **Save** and **Load** compiled TeaScript programs as TeaScript Binary files (*.tsb).
26-
- **Suspend** and **Continue** TeaScript programs at (nearly) any time by either themselves, by maximum time or instruction constraint or by an external request from another thread.
27-
- Use TeaScript code similar like a **coroutine** in your C++ Application by yielding values from any place and **co-operative / preemptive execution** possibilities.
28-
- Nerd feature: program directly in TeaScript **Assembly**.
29-
- improved debugging capabilities with single stepping, view the callstack, view corresponding source code and more.
30-
- Opt-out header only library for save includes and compile time
24+
- **Web module** as a preview for **http client / server** functionality with enhanced build-in **JSON** support.
25+
- Full **JSON** support for read and write operations (String/File ⟷ (Named) Tuple).
26+
- Provided C++ JSON adapter for nlohmann::json, RapidJSON, Boost.Json and PicoJson.
27+
- Added missing write support for TOML (now TOML is complete as well).
28+
- Import/export of C++ JSON / TOML objects from/to ValueObject of TeaScript (as a Named Tuple)
29+
30+
## Example HTTP GET
31+
```cpp
32+
// issue a http GET request (here to a test page for JSON as payload)
33+
def reply := web_get( "headers.jsontest.com" )
34+
35+
// access http status code and its reason (may print "200: OK")
36+
println( reply.code % ": " % reply.reason )
37+
38+
// print all header entries of the reply
39+
tuple_print( reply.header, "header", 1 )
40+
41+
// the above may print:
42+
// [...]
43+
// header.Date: "Sat, 31 Aug 2024 13:34:26 GMT"
44+
// header.Server: "Google Frontend"
45+
// header.Content-Length: "236"
46+
47+
// If the payload was sent as Content-Type "application/json" TeaScript automatically builds a Tuple out of it.
48+
// Then all elements/objects can be accessed directly. In this example the server just echoed the header of
49+
// the request back as a json formatted string and TeaScript created a Json compatible Tuple from it:
50+
51+
// print the Host value
52+
println( reply.json.Host )
53+
// print the User-Agent
54+
println( reply.json["User-Agent"] )
55+
// dot access possible as well!
56+
println( reply.json."User-Agent" )
57+
```
3158
3259
## General information
3360
Get a very nice overview with the most **impressive highlights** here:<br>

0 commit comments

Comments
 (0)