octave-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Octave-bug-tracker] [bug #34532] eval fails to throw exception when eva


From: anonymous
Subject: [Octave-bug-tracker] [bug #34532] eval fails to throw exception when evaluating JSON-like string
Date: Tue, 11 Oct 2011 19:16:13 +0000
User-agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/534.30 (KHTML, like Gecko) Ubuntu/10.04 Chromium/12.0.742.112 Chrome/12.0.742.112 Safari/534.30

URL:
  <http://savannah.gnu.org/bugs/?34532>

                 Summary: eval fails to throw exception when evaluating
JSON-like string
                 Project: GNU Octave
            Submitted by: None
            Submitted on: Tue 11 Oct 2011 07:16:12 PM UTC
                Category: Interpreter
                Severity: 3 - Normal
                Priority: 5 - Normal
              Item Group: Incorrect Result
                  Status: None
             Assigned to: None
         Originator Name: Qianqian Fang
        Originator Email: address@hidden
             Open/Closed: Open
         Discussion Lock: Any
                 Release: dev
        Operating System: GNU/Linux

    _______________________________________________________

Details:

here is an example:

octave:1> eval('[{"value":"New","onclick":"CreateNewDoc"}]')
ans = 
{
  [1,1] = 
  [1,2] = 
}

I was expecting eval fails and throws an exception.

Some more strange results:

octave:5> eval('[{"test"}]')
ans = 
{
  [1,1] = test
}


octave:7> eval('[{"test":"t"}]')
ans = 
{
  [1,1] = t
}

octave:8> eval('[{"test":"aaa"}]')
ans = 
{
  [1,1] = 
}

octave:10>  eval('[{"test":"ttt"}]')
ans = 
{
  [1,1] = t
}


I don't really understand the rationale behind this. I discovered this issue
as I am working on a JSON encoder/decoder for MATLAB/Octave, see
http://iso2mesh.sf.net/cgi-bin/index.cgi?jsonlab





    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?34532>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]