Menu
  • HOME
  • TAGS

JSON parsing not working javascript [closed]

javascript,json,parsing,sanity-check

You have an extra : symbol in your json variable. Try: var json = [{"OID":"1b383180186940dc0cc2a781fcf013ce", "NUMBER":"029348203984","SETTINGS":"Default","LATEST":"09-06-2015"}]; var obj=json[0]; console.log(obj['OID']); console.log(obj['NUMBER']); Edit: For next time, I recommend declaring your objects (and contents of arrays, and really anything that can get over 80 characters), in a more readable format. It will help...

C++ sanity check fails: several variables/memory positions are changed to garbage, even if I never acess them

c++,pointers,skip-lists,sanity-check

Here's the output of clang's address sanitizer (after setting it up properly): ==15146==ERROR: AddressSanitizer: stack-buffer-overflow on address 0x7ffeb006bb80 at pc 0x0000004e093c bp 0x7ffeb006ba60 sp 0x7ffeb006ba58 WRITE of size 8 at 0x7ffeb006bb80 thread T0 #0 0x4e093b in insertNode(int, int) skiplist.cpp:55:27 #1 0x4e3385 in skiplist.cpp:160:9 #2 0x7f40b2fcda3f in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x20a3f) #3 0x419508...